diff options
Diffstat (limited to 'package.bash')
-rwxr-xr-x | package.bash | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/package.bash b/package.bash index d3b95fd..4cb462e 100755 --- a/package.bash +++ b/package.bash @@ -3,8 +3,23 @@ set -eu cd $(dirname "$0") -source build.bash # Builds binary and sets GITVERSION (example: v0.7-15-gf01f599) -source /etc/os-release # Sets ID (example: fedora) and VERSION_ID (example: 23) +# Build binary and sets $GITVERSION (example: v0.7-15-gf01f599) +source build.bash + +# Set $ID (example: "fedora", "debian") and $VERSION_ID (example: "23", "8") +if [[ -e /etc/os-release ]]; then + # Modern Debian and Fedora + source /etc/os-release +elif [[ -e /etc/redhat-release ]]; then + # RHEL and CentOS + ID=$(cat /etc/redhat-release | tr ' ' '_') + VERSION_ID="" +else + echo "Could not get distribution version" + ID=unknown + VERSION_ID=.unknown +fi + ARCH=$(go env GOARCH) # Build gocryptfs.1 man page ./Documentation/MANPAGE-render.bash > /dev/null |