summaryrefslogtreecommitdiffstats
path: root/retiolum/bin/create-host-tar
blob: 48ce26d50831956612d188bf5846e65e6d102664 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
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))
rm -f $HOSTFILE
tar czf  $HOSTFILE  -C $HOSTDIR .
chmod a+rx $HOSTFILE