source: git/git-archive @ cd62b6

spielwiese
Last change on this file since cd62b6 was 06f38e, checked in by Oleksandr Motsak <motsak@…>, 9 years ago
Updated git-archive
  • Property mode set to 100755
File size: 694 bytes
RevLine 
[06f38e]1#!/bin/bash
[e44b658]2
3export GIT_WORK_TREE=`dirname "$0"`
4export GIT_DIR="$GIT_WORK_TREE/.git"
5
[06f38e]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
[e44b658]11ID=`$GIT_WORK_TREE/git-version-gen $GIT_WORK_TREE/.tarball-git-version`
[06f38e]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"
[e44b658]19
[06f38e]20echo "$OUTPUT.bz2 was generated from git repository at [$GIT_WORK_TREE]"
Note: See TracBrowser for help on using the repository browser.