From dbe751fd2f343122a5e9656c42287028729b30c2 Mon Sep 17 00:00:00 2001 From: Craig Cook Date: Mon, 21 Jan 2013 15:49:10 +0000 Subject: [PATCH] Updated bld.sh to check for instead of using hardcoded value --- bld.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/bld.sh b/bld.sh index 1cedaa1d0..d61019a7c 100755 --- a/bld.sh +++ b/bld.sh @@ -6,15 +6,25 @@ pushd editions/tw5.com > /dev/null -echo "five.tiddlywiki.com" > ../../../jermolene.github.com/CNAME +if [ -z "$JERMOLENE_HOME" ]; then + JERMOLENE_HOME=../../../jermolene.github.com +fi + +if [ ! -d "$JERMOLENE_HOME" ]; then + echo 'A valid JERMOLENE_HOME directory must be set' + exit 1 +fi + +echo "Using JERMOLENE_HOME as [$JERMOLENE_HOME]" +echo "five.tiddlywiki.com" > $JERMOLENE_HOME/CNAME node ../../tiddlywiki.js \ --verbose \ --password password \ --savetiddler ReadMe ../../readme.md text/html \ - --savetiddler $:/core/templates/tiddlywiki5.template.html ../../../jermolene.github.com/index.html text/plain \ - --savetiddler $:/core/templates/tiddlywiki5.encrypted.template.html ../../../jermolene.github.com/encrypted.html text/plain \ - --savetiddler $:/core/templates/static.template.html ../../../jermolene.github.com/static.html text/plain \ + --savetiddler $:/core/templates/tiddlywiki5.template.html $JERMOLENE_HOME/index.html text/plain \ + --savetiddler $:/core/templates/tiddlywiki5.encrypted.template.html $JERMOLENE_HOME/encrypted.html text/plain \ + --savetiddler $:/core/templates/static.template.html $JERMOLENE_HOME/static.html text/plain \ || exit 1 popd > /dev/null @@ -26,8 +36,8 @@ pushd editions/empty > /dev/null node ../../tiddlywiki.js \ --verbose \ --password password \ - --savetiddler $:/core/templates/tiddlywiki5.template.html ../../../jermolene.github.com/empty.html text/plain \ - --savetiddler $:/core/templates/tiddlywiki5.encrypted.template.html ../../../jermolene.github.com/empty_encrypted.html text/plain \ + --savetiddler $:/core/templates/tiddlywiki5.template.html $JERMOLENE_HOME/empty.html text/plain \ + --savetiddler $:/core/templates/tiddlywiki5.encrypted.template.html $JERMOLENE_HOME/empty_encrypted.html text/plain \ || exit 1 popd > /dev/null