summaryrefslogtreecommitdiffstats
path: root/retiolum/bin/create-host-tar
diff options
context:
space:
mode:
authorroot <root@dev64.stacklet.com>2013-01-02 18:34:41 +0000
committerroot <root@dev64.stacklet.com>2013-01-02 18:34:41 +0000
commitc971ce27a09d4aa5e740fda3664c8a8181de3233 (patch)
tree2db7dd4707781acc06958fce35658c0cf8f4b008 /retiolum/bin/create-host-tar
parenta80634362df520d6f3fa2e90e7ed3c9523367488 (diff)
fix adv_graphgen, github_listener
Diffstat (limited to 'retiolum/bin/create-host-tar')
-rwxr-xr-xretiolum/bin/create-host-tar16
1 files changed, 11 insertions, 5 deletions
diff --git a/retiolum/bin/create-host-tar b/retiolum/bin/create-host-tar
index 9def7cec..48ce26d5 100755
--- a/retiolum/bin/create-host-tar
+++ b/retiolum/bin/create-host-tar
@@ -1,9 +1,15 @@
#!/bin/sh
-set -xeuf
-WEBDIR=${WEBDIR:-/srv/http/pub/retiolum}
+set -euf
+if [ x"${1:-}" = "x" ];then
+ echo "usage: $0 DIRECTORY"
+ exit 1
+fi
+
+WEBDIR=$1
+HOSTDIR=${HOSTDIR:-../hosts}
HOSTFILE=$WEBDIR/hosts.tar.gz
+
cd $(dirname $(readlink -f $0))
-git pull origin master || logger "cannot pull painload"
-#rm $HOSTFILE
-tar czf $HOSTFILE -C ../hosts .
+rm -f $HOSTFILE
+tar czf $HOSTFILE -C $HOSTDIR .
chmod a+rx $HOSTFILE