summaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorJakob Borg <jakob@nym.se>2014-04-22 08:25:40 +0200
committerJakob Borg <jakob@nym.se>2014-04-22 08:25:40 +0200
commit53cd8778999d1dfad0870a4d09dbf5f981695505 (patch)
tree7d872320cedfb693213803ecb4cfb32bda6ca512 /build.sh
parent1207223f3d05f9a16bf825c5d41b58857c5dcf9f (diff)
More portable hostname
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index a429b93210..83ea2366fb 100755
--- a/build.sh
+++ b/build.sh
@@ -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() {