3 # Take a snapshot of the current pidgin-sipe git HEAD from the mob branch.
5 # You can specify the path to a local repository to speed up the cloning
6 # process. The output will be a bzip2 compressed tarball whose name includes
7 # the current date and the abbreviated commit object name of HEAD.
9 # Adapted from several examples found on the Internet.
13 REPOSITORY
="git+ssh://mob@repo.or.cz/srv/git/siplcs.git"
19 CLONEDIR
=${PROJECT}-${TODAY}
20 echo "Clone directory '$CLONEDIR'."
21 REFERENCE
=${1:+--reference $1}
23 echo "Using local repository under '$1'."
28 echo "Cloning from repository URL '$REPOSITORY'."
30 git clone
-n $REFERENCE $REPOSITORY $CLONEDIR
32 git checkout
-q -b $CLONEDIR origin
/$BRANCH
35 COMMIT
=$
(git log
-n 1 --abbrev-commit --pretty=oneline | cut
-d' ' -f1|
sed -e 's/\.//g')
36 PREFIX
=${PROJECT}-${TODAY}git${COMMIT}
37 ARCHIVE
=${PREFIX}.
tar.bz2
38 echo "Creating archive '$ARCHIVE'..."
39 git archive
--format=tar --prefix=$PREFIX/ HEAD |
bzip2 >..
/${PREFIX}.
tar.bz2