diff genwebgallery @ 47:d1ad806b6ee3 default tip

picsize and thumbsize are now numbers in any case (used printf); non-regular and non-existent files are skipped
author meillo@marmaro.de
date Mon, 23 Jun 2008 20:57:55 +0200
parents b991e188f1fa
children
line wrap: on
line diff
--- a/genwebgallery	Mon Jun 23 20:05:50 2008 +0200
+++ b/genwebgallery	Mon Jun 23 20:57:55 2008 +0200
@@ -202,12 +202,12 @@
 			shift
 			;;
 		'-ps' | '--pic-size')
-			sizePic="$2"
+			sizePic="`echo "$2" | awk '{printf("%d",$0)}'`"
 			shift
 			shift
 			;;
 		'-ts' | '--thumb-size')
-			sizeThumb="$2"
+			sizeThumb="`echo "$2" | awk '{printf("%d",$0)}'`"
 			shift
 			shift
 			;;
@@ -255,6 +255,13 @@
 fi
 
 for i in "$@" ; do
+	# skip over invalid files
+	if [ ! -f "$i" ] ; then
+		log "does not exist, or no regular file: $i"
+		log "  skipping"
+		continue
+	fi
+
 	file="`basename $i`"
 	targetFile="$targetDir/$file.htm"
 	log "processing file: $file"