+
+if [ -n "$localFiles" ]; then
+ echo "WARNING: using local files rather than git tag" >&2
+ echo "This is fine for testing, but should not be used for releases " >&2
+ pwd=`pwd`
+ dir=`basename "$pwd"`
+ cd ..
+ cp -a "$dir" $NAME-$VERSION
+ rm -rf $NAME-$VERSION/.git
+ tar cf "$pwd"/tmp.tar $NAME-$VERSION
+ rm -rf $NAME-$VERSION
+ cd "$dir"
+else
+ echo "from git"
+ git archive --format=tar --prefix=$NAME-$VERSION/ v${VERSION} > tmp.tar || die "This version is not tagged in Git";
+fi
+