summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow (mars.fritz.box) <paul@buetow.org>2013-12-22 13:01:53 +0100
committerPaul Buetow (mars.fritz.box) <paul@buetow.org>2013-12-22 13:01:53 +0100
commitda525845b7934cc9f40ec55618d86510b0b1131f (patch)
tree9616cb3b0b4695f521535a6c7806780e28f1acd8
parent51537454ed2ba58027e77337088c09a50c4b859e (diff)
bugfix
-rw-r--r--Makefile2
-rwxr-xr-xphotoalbum.sh11
2 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index a99da1f..4d283df 100644
--- a/Makefile
+++ b/Makefile
@@ -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 .