diff options
| author | Paul Buetow (mars.fritz.box) <paul@buetow.org> | 2013-12-22 17:36:48 +0100 |
|---|---|---|
| committer | Paul Buetow (mars.fritz.box) <paul@buetow.org> | 2013-12-22 17:36:48 +0100 |
| commit | d65bb796ceaa9eff9b7e24345e74ac06e82d9f24 (patch) | |
| tree | 31e6bf345c3b42eb4c7806f6d632292f81277cc6 | |
| parent | 3e957609d606d435f70920a0f51650e8015cc11f (diff) | |
bugfixing
| -rwxr-xr-x | photoalbum.sh | 8 |
1 files 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 |
