diff --git a/package-source.sh b/package-source.sh new file mode 100755 index 0000000..f531ffb --- /dev/null +++ b/package-source.sh @@ -0,0 +1,11 @@ +#!/bin/bash -eux + +# Get git version, something like "v1.2.3" +GITVERSION=$(git describe --tags --dirty) +# Drop leading "v" to get just "1.2.3" +VERSION=${GITVERSION#v} +# Folder name inside the tarball should be "encfs-1.2.3" +PREFIX="encfs-$VERSION" + +# Actually create archive +git archive --prefix "$PREFIX/" -o $PREFIX.tar.gz HEAD