encfs/package-source.sh
Jakob Unterwurzacher 5c9d739b32 Add package-source.sh helper
Automates creating a source tarball with the right
folder name inside
2018-01-28 15:36:41 +01:00

12 lines
329 B
Bash
Executable File

#!/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