--- scripts/pgallery/src/pgallery.sh 2012/08/29 10:52:35 1.10 +++ scripts/pgallery/src/pgallery.sh 2012/08/29 11:21:41 1.11 @@ -5,7 +5,7 @@ # can do whatever you want with this stuff. If we meet some day, and you think # this stuff is worth it, you can buy me a beer in return Aron Schlesinger # -# $Paefchen: scripts/pgallery/src/pgallery.sh,v 1.9 2012/08/28 17:37:11 as Exp $ +# $Paefchen: scripts/pgallery/src/pgallery.sh,v 1.10 2012/08/29 10:52:35 as Exp $ # ARG_TITLE="PGallery" @@ -461,6 +461,20 @@ get_exif_info() echo $exifinfo | sed -e 's/ mm /mm /' -e 's/ sec./s/' -e 's/ ISO / ISO/' } +# +# is_in_list() +# +is_in_list() +{ + list=$1 + value=$2 + for entry in $list + do + test "$entry" = "$value" && return 0 + done + return 1 +} + # parse args while [ "$1" != "" ] do @@ -659,7 +673,7 @@ echo create html index ) > $ARG_INDEX # create single html files -test $ARG_UPDATE -eq 1 && FLIST="$FLIST_NEW $FLIST_UPDATE" +#test $ARG_UPDATE -eq 1 && FLIST="$FLIST_NEW $FLIST_UPDATE" i=0 echo -n "create single html files " for file in $FLIST @@ -667,6 +681,12 @@ do h=$i i=$(($i + 1)) j=$(($i + 1)) + + # is update mod and no new images founded + if [ $ARG_UPDATE -eq 1 -a "$FLIST_NEW" = "" ] + then + is_in_list "$FLIST_UPDATE" "$file" || continue + fi big="${file}.big.jpg" imglink="${file}.html"