Deployment script file
authorMichaël Parienti (edelweiss) <mparienti@easter-eggs.com>
Mon, 8 Jun 2009 10:19:09 +0000 (12:19 +0200)
committerMichaël Parienti (edelweiss) <mparienti@easter-eggs.com>
Mon, 8 Jun 2009 10:19:09 +0000 (12:19 +0200)
script/deploy.sh [new file with mode: 0644]

diff --git a/script/deploy.sh b/script/deploy.sh
new file mode 100644 (file)
index 0000000..8243da9
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+
+CONF_FILE=./conf/$1
+
+if ! [ -f $CONF_FILE ]; then
+    echo File \"$CONF_FILE\" doesn’t exist;
+    exit 1;
+fi
+
+function get() {
+    LINE=`grep ^$1 $CONF_FILE`
+    echo `echo $LINE | cut -f 2 -d ' ' -`
+}
+
+SSH=$(get ssh)
+WIKIPATH=$(get wikipath)
+
+scp -r src/* $SSH:${WIKIPATH}skins/