aboutsummaryrefslogtreecommitdiffstats
path: root/dist.sh
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-30 14:50:31 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-30 14:50:55 +0100
commitf826e627cf53496b3ec79be2cc72a5445c89db19 (patch)
treebc2f68d3f701df1da47266d644d2930b18c2ca08 /dist.sh
parent15b0796571b8a00408ffddc766191f5d7455d96d (diff)
downloadrspamd-f826e627cf53496b3ec79be2cc72a5445c89db19.tar.gz
rspamd-f826e627cf53496b3ec79be2cc72a5445c89db19.zip
Support dist on FreeBSD and Darwin.
Diffstat (limited to 'dist.sh')
-rwxr-xr-xdist.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/dist.sh b/dist.sh
index af4e14e9e..e2ecd8e19 100755
--- a/dist.sh
+++ b/dist.sh
@@ -1,7 +1,9 @@
#!/bin/sh
-if [ $# -ne 1 ] ; then
- echo "Usage: dist.sh <filename>"
+TAR=${2:-"tar"}
+
+if [ $# -lt 1 ] ; then
+ echo "Usage: dist.sh <filename> [tar_command]"
exit 1
fi
@@ -21,5 +23,5 @@ for sub in $SUBMODULES ; do
(cd $sub && git ls-files | sed -e "s|^|$sub/|" >> $OUT)
done
-tar -c --exclude='.[^/]*' --exclude='*.xz' --exclude='*.gz' --no-recursion --transform "s|^|$PREFIX/|" -a -T $OUT -v -f $FNAME
+${TAR} -c --exclude='.[^/]*' --exclude='*.xz' --exclude='*.gz' --no-recursion --transform "s|^|$PREFIX/|" -a -T $OUT -v -f $FNAME
rm -f $OUT