X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=fgen.sh;h=c7065c8d2edeeb7e3d94893509d7bfaec2246f5e;hb=82d3c92276a2a97dc50911dcf829a1c71d035079;hp=8a700c7e621a063d9915dbaef7a861ee722075e1;hpb=7dd80dc7bc0a386bca55d6f7f44f55c11d62c441;p=fgen.git diff --git a/fgen.sh b/fgen.sh index 8a700c7..c7065c8 100755 --- a/fgen.sh +++ b/fgen.sh @@ -230,20 +230,14 @@ if [ $# -eq 0 ]; then exit 1 fi -if [ $# -gt 1 ]; then - echo "${PROG_NAME}: Trop d'arguments." - echo "Essayez \`${PROG_NAME} -h' pour plus d'informations." - exit 1 -fi +src="${*}" -if [ ! -f "${1}" ]; then +if [ ! -f "${src}" ]; then log_err "Error: PSD source file not found" exit 1 fi -src=${1} - -dest=$(basename -s .psd ${1}) +dest=$(basename -s .psd "${src}") layers=${dest}/layers.txt if [ ! -d ${dest} ]; then @@ -259,7 +253,7 @@ done if [ ${trames} -eq 1 ]; then # %s: scene number - identify ${IM_OPS} -verbose -format "scene:%s,label:%l,geometry:%g,\n" ${src} > ${layers} + identify ${IM_OPS} -verbose -format "scene:%s,label:%l,geometry:%g,\n" "${src}" > ${layers} # Remove line(s) with empty label: ${SED} -i -e /label:,.*/d ${layers}