summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2007-10-12 14:12:34 +0000
committerJonas Smedegaard <dr@jones.dk>2007-10-12 14:12:34 +0000
commitfc15a5b7cb7eb14cdb419475a1fa0a45ed38338e (patch)
tree17a271978f75af25c663f777c8db8d139788049d
parent4c96f16899299f9b1227fde34ba387a789f007ce (diff)
New helper script to initialize a Redpill-style ikiwiki site.
-rwxr-xr-xlocalikiwikicreatesite22
1 files changed, 22 insertions, 0 deletions
diff --git a/localikiwikicreatesite b/localikiwikicreatesite
new file mode 100755
index 0000000..9ab367e
--- /dev/null
+++ b/localikiwikicreatesite
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Origin: http://ikiwiki.info/setup/
+
+set -e
+
+host=$1
+[ -z "$host" ] && echo "ERROR: Hostname must be supplied!" && exit 1
+
+SRCDIR=~/private_webdata/"$host"/content
+DESTDIR=~/public_websites/"$host"
+
+mkdir -p $SRCDIR
+cat <<EOF >$SRCDIR/index.mdwn
+Welcome to your new wiki.
+All wikis are supposed to have a <a href="../sandbox/">SandBox</a>,
+so this one does too.
+----
+This wiki is powered by [ikiwiki](http://ikiwiki.info).
+EOF
+
+ikiwiki --verbose $SRCDIR $DESTDIR --url=http://"$host"