From d65bb796ceaa9eff9b7e24345e74ac06e82d9f24 Mon Sep 17 00:00:00 2001 From: "Paul Buetow (mars.fritz.box)" Date: Sun, 22 Dec 2013 17:36:48 +0100 Subject: bugfixing --- photoalbum.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/photoalbum.sh b/photoalbum.sh index 2fc9997..876a612 100755 --- a/photoalbum.sh +++ b/photoalbum.sh @@ -44,7 +44,8 @@ function scale () { cd - &>/dev/null echo 'Removing spaces from file names' - find ./dist/photos -type f -name '* *' | while read file; do + find ./dist/photos -type f -name '* *' | + while read file; do rename 's/ /_/g' "${file}" done } @@ -112,18 +113,21 @@ function generate () { redirectpage=$(( page+1 ))-1 else redirectpage=${page}-${lastview} + echo "template redirect 0-${MAXPREVIEWS}" template redirect 0-${MAXPREVIEWS} redirectpage=1-1 fi + echo "redirectpage: $redirectpage" + echo "template redirect ${next}redirect" template redirect ${next}redirect done } createdirs scale -find ./dist/html -type f -name \*.html -delete +find ./dist/ -type f -name \*.html -delete template index index ./dist generate -- cgit v1.2.3