X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Fdfb-photoshow.git;a=blobdiff_plain;f=showdir;fp=showdir;h=650e010a508ba4ed7d75ae0e8b34465880cf6e4a;hp=c276687063911c31d6ecafe404b98397b83df848;hb=4f8a1d8f1939a3c7ddd6a442be2e3ebf13bd5298;hpb=ed1c6fe15bbe02311f626ce27085c574aa2e1f7d diff --git a/showdir b/showdir index c276687..650e010 100755 --- a/showdir +++ b/showdir @@ -8,7 +8,7 @@ usage() { echo } -if [ "$#" <= "2" ]; then +if [ -z "$1" -o ! -d "$2" ]; then usage exit 0 fi @@ -18,9 +18,11 @@ dir="$2" files="`find $dir -name '*.jpg'` `find $dir -name '*.JPG'` `find $dir -name '*.jpe'` -`find $dir -name '*.IPE'`" +`find $dir -name '*.JPE'` +`find $dir -name '*.png'` +`find $dir -name '*.PNG'`" -./dfb-photoshow $1 $files +[ ! -z "`echo $files | sed 's/\ //g'`" ] && ./dfb-photoshow $1 $files echo echo done