aboutsummaryrefslogtreecommitdiffhomepage
path: root/build_tools
diff options
context:
space:
mode:
authorGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2016-05-25 16:55:40 +0000
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2016-05-25 16:56:00 +0000
commit987f7cafd31d8366d8012a67e309a50bb914b32b (patch)
tree05d08d8f503d3af1dfd0964855ee0f448dbdec06 /build_tools
parentb883e59ee97e0fb63e77adc4cf3dfb9ef77e0a10 (diff)
make_tarball: use a temporary directory rather than just /tmp
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/make_tarball.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/build_tools/make_tarball.sh b/build_tools/make_tarball.sh
index eec9d436..c1c840e8 100755
--- a/build_tools/make_tarball.sh
+++ b/build_tools/make_tarball.sh
@@ -55,16 +55,21 @@ autoconf
./configure --with-doxygen
make doc share/man
echo $VERSION > version
-cd /tmp
-rm -f "$prefix"
+
+PREFIX_TMPDIR=`mktemp -d`
+cd $PREFIX_TMPDIR
+
ln -s "$wd" "$prefix"
TAR_APPEND="$TAR --append --file=$path --mtime=now --owner=0 --group=0 --mode=g+w,a+rX"
$TAR_APPEND --no-recursion "$prefix"/user_doc
$TAR_APPEND "$prefix"/user_doc/html "$prefix"/share/man
$TAR_APPEND "$prefix"/version
$TAR_APPEND "$prefix"/configure "$prefix"/config.h.in
-rm -f "$prefix"/version
-rm -f "$prefix"
+rm "$prefix"/version
+unlink "$prefix"
+
+cd -
+rmdir $PREFIX_TMPDIR
# gzip it
gzip "$path"