source: git/git-archive @ 112f6ef

spielwiese
Last change on this file since 112f6ef was 06f38e, checked in by Oleksandr Motsak <motsak@…>, 9 years ago
Updated git-archive
  • Property mode set to 100755
File size: 694 bytes
Line 
1#!/bin/bash
2
3export GIT_WORK_TREE=`dirname "$0"`
4export GIT_DIR="$GIT_WORK_TREE/.git"
5
6if [ ! -d "$GIT_WORK_TREE/.git" ]; then
7  echo "Sorry could not generate archive with '$0' for [$GIT_WORK_TREE], which is not a git repository!"
8  exit 1
9fi
10
11ID=`$GIT_WORK_TREE/git-version-gen $GIT_WORK_TREE/.tarball-git-version`
12OUTPUT="./singular-$ID.tar"
13
14git archive --format tar -o "$OUTPUT" HEAD || ( ret =$?; echo "Sorry could not generate archive for [$GIT_WORK_TREE] with '$0' -> code: $ret"; exit $ret; )
15
16echo $ID > .tarball-git-version && tar uf "$OUTPUT" .tarball-git-version && rm .tarball-git-version
17
18bzip2 "$OUTPUT"
19
20echo "$OUTPUT.bz2 was generated from git repository at [$GIT_WORK_TREE]"
Note: See TracBrowser for help on using the repository browser.