12345678910111213141516171819202122232425262728293031 |
- #!/bin/sh
- # Part of Zombie Navigator
- # Copyright © 2015 Zombie Navigator Developers
- dir="`dirname "$0"`"
- dir="`cd "$dir"; cd .. ; pwd`"
- cd "$dir/src"
- package="`basename "$dir"`"
- if ! which git >/dev/null 2>&1 ; then
- echo "Please install git somewhere in PATH" >&2
- exit 1
- fi
- tree="$1"
- [ ! "$tree" ] && tree="`git branch | grep '*' | awk '{print $2}'`"
- [ ! "$tree" ] && tree="master"
- if ! which 7z >/dev/null 2>&1 ; then
- git archive --prefix="$package"_"$tree"/ "$tree" | gzip -9
- else
- git archive --prefix="$package"_"$tree"/ "$tree" | 7z a dummy -tgzip -si -so -mx=9
- fi
- # vim: ts=4 noet ai
|