Revision c717a0d94de0f701587bc5adbfab65df74dd599a authored by Hans Schoenemann on 20 February 2019, 18:30:05 UTC, committed by Hans Schoenemann on 20 February 2019, 18:30:05 UTC
1 parent c079b2f
git-archive
#!/bin/bash
export GIT_WORK_TREE=`dirname "$0"`
export GIT_DIR="$GIT_WORK_TREE/.git"
if [ ! -d "$GIT_WORK_TREE/.git" ]; then
echo "Sorry could not generate archive with '$0' for [$GIT_WORK_TREE], which is not a git repository!"
exit 1
fi
ID=`$GIT_WORK_TREE/git-version-gen $GIT_WORK_TREE/.tarball-git-version`
OUTPUT="./singular-$ID.tar"
git archive --format tar -o "$OUTPUT" HEAD || ( ret =$?; echo "Sorry could not generate archive for [$GIT_WORK_TREE] with '$0' -> code: $ret"; exit $ret; )
echo $ID > .tarball-git-version && tar uf "$OUTPUT" .tarball-git-version && rm .tarball-git-version
bzip2 "$OUTPUT"
echo "$OUTPUT.bz2 was generated from git repository at [$GIT_WORK_TREE]"
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...