More portable hostname

This commit is contained in:
Jakob Borg 2014-04-22 08:25:40 +02:00
parent 1207223f3d
commit 53cd877899

View File

@ -6,7 +6,8 @@ distFiles=(README.md LICENSE) # apart from the binary itself
version=$(git describe --always --dirty)
date=$(date +%s)
user=$(whoami)
host=$(hostname -s)
host=$(hostname)
host=${host%%.*}
ldflags="-w -X main.Version $version -X main.BuildStamp $date -X main.BuildUser $user -X main.BuildHost $host"
build() {