aboutsummaryrefslogtreecommitdiff
path: root/templates/deploy.sh.erb
diff options
context:
space:
mode:
Diffstat (limited to 'templates/deploy.sh.erb')
-rw-r--r--templates/deploy.sh.erb12
1 files changed, 8 insertions, 4 deletions
diff --git a/templates/deploy.sh.erb b/templates/deploy.sh.erb
index 07760ec..e5bfa92 100644
--- a/templates/deploy.sh.erb
+++ b/templates/deploy.sh.erb
@@ -25,7 +25,8 @@ fi
mkdir -p $SITE/"$INSTANCE"_src/
# Create initial page
-echo > $SITE/"$INSTANCE"_src/index.mdwn <<EOF
+if [ ! -e $SITE/"$INSTANCE"_src/index.mdwn ]; then
+ echo > $SITE/"$INSTANCE"_src/index.mdwn <<EOF
Welcome to your new wiki.
All wikis are supposed to have a [[SandBox]], so this one does too.
@@ -34,11 +35,14 @@ All wikis are supposed to have a [[SandBox]], so this one does too.
This wiki is powered by [ikiwiki](http://ikiwiki.info).
EOF
+fi
# Create ikiwiki instance
-ikiwiki-makerepo git $SITE/"$INSTANCE"_src/ $REPO
-touch $REPO/git-daemon-export-ok
-( cd $REPO/$NAME.git && git --bare update-server-info )
+if [ ! -d "$REPO" ]; then
+ ikiwiki-makerepo git $SITE/"$INSTANCE"_src/ $REPO
+ touch $REPO/git-daemon-export-ok
+ ( cd $REPO/$NAME.git && git --bare update-server-info )
+fi
# Refresh the instance
ikiwiki-refresh $NAME $INSTANCE