3 if [ $# -eq 2 -a -f "$2/.git/HEAD" ]; then
4 BRANCH
="`cut -d / -f 3 $2/.git/HEAD`"
5 VERSION
="$VERSION-`cut -b -7 $2/.git/refs/heads/$BRANCH`"
8 cat << EOF > "$2/main.h.in"
12 #define QPWMC_VERSION "$VERSION"
17 cmp --quiet "$2/main.h.in" "$2/main.h"
19 mv -f "$2/main.h.in" "$2/main.h"
29 ROOT
="qpwmc-`sed -ne '/VERSION/{s/"//g
;p
;q
}' < main.h | \
36 echo "Updating ChangeLog ..."
37 git log > $ROOT/ChangeLog
39 echo "Copying git controlled files ..."
40 for f in `git ls-files`; do
41 mkdir -p "$ROOT/`dirname $f`"
46 tar jcf "$TGZ" "$ROOT"