diff options
| author | Paul Buetow (mars.fritz.box) <paul@buetow.org> | 2013-12-22 13:01:53 +0100 |
|---|---|---|
| committer | Paul Buetow (mars.fritz.box) <paul@buetow.org> | 2013-12-22 13:01:53 +0100 |
| commit | da525845b7934cc9f40ec55618d86510b0b1131f (patch) | |
| tree | 9616cb3b0b4695f521535a6c7806780e28f1acd8 | |
| parent | 51537454ed2ba58027e77337088c09a50c4b859e (diff) | |
bugfix
| -rw-r--r-- | Makefile | 2 | ||||
| -rwxr-xr-x | photoalbum.sh | 11 |
2 files changed, 9 insertions, 4 deletions
@@ -7,4 +7,4 @@ dist: rm -Rf dist 2>/dev/null mkdir dist mv thumbs html photos dist - cp index.html dist + mv index.html ./dist diff --git a/photoalbum.sh b/photoalbum.sh index 1658a48..b263f41 100755 --- a/photoalbum.sh +++ b/photoalbum.sh @@ -14,11 +14,16 @@ function createdirs () { function template () { local -r template=$1 local -r html=$2 + local destdir=$3 + + if [ -z "$destdir" ]; then + destdir=html/ + fi if [ -d ./templates/ ]; then - source ./templates/${template}.tmpl >> ./html/${html}.html + source ./templates/${template}.tmpl >> ./${destdir}/${html}.html else - source ../templates/${template}.tmpl >> ../html/${html}.html + source ../templates/${template}.tmpl >> ../${destdir}/${html}.html fi } @@ -112,5 +117,5 @@ function generate () { createdirs scale find ./html -type f -name \*.html -delete -cd html && template index index && cd .. generate 1 +template index index . |
