2008年6月5日 星期四

git compress tarbell script

#!/bin/sh

if [ $# -lt 1 ] ; then
    echo >&2 "usage: `basename $0` <branch>"
    exit 1
fi

FILE=`basename $PWD`-$1-`date +%Y%m%d`

git archive --format=tar "--prefix=$FILE/" --verbose $1 | bzip2 -fv > "$FILE.tbz2"

沒有留言:

張貼留言