diff options
Diffstat (limited to 'tools/resources')
-rwxr-xr-x | tools/resources/optimize-png-files.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/resources/optimize-png-files.sh b/tools/resources/optimize-png-files.sh index 55640ff..e5e4043 100755 --- a/tools/resources/optimize-png-files.sh +++ b/tools/resources/optimize-png-files.sh @@ -476,9 +476,15 @@ if [ -n "$COMMIT" ] ; then done else for d in $DIRS; do - info "Optimizing png files in $d" - optimize_dir $d - info "" + if [ -d $d ] ; then + info "Optimizing png files in $d" + optimize_dir $d + info "" + elif [ -f $d ] ; then + optimize_file $d + else + echo "Not a file or directory: $d"; + fi done fi |