X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Fdfb-photoshow.git;a=blobdiff_plain;f=showdir;h=650e010a508ba4ed7d75ae0e8b34465880cf6e4a;hp=2e7d71bf077c3554bda45e2e2190246d0fe62826;hb=bfdf5897cd09b15d84608828f82cbd5163c11ab9;hpb=53343fedc06fc1c837615e53cc2b310b8785e6c6 diff --git a/showdir b/showdir index 2e7d71b..650e010 100755 --- a/showdir +++ b/showdir @@ -8,18 +8,21 @@ usage() { echo } -if [ "$#" <= "2" ]; then +if [ -z "$1" -o ! -d "$2" ]; then usage exit 0 fi dir="$2" -files=`find $dir -name '*.jpg'` -files="$files -`find $dir -name '*.JPG'`" +files="`find $dir -name '*.jpg'` +`find $dir -name '*.JPG'` +`find $dir -name '*.jpe'` +`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