summaryrefslogtreecommitdiff
path: root/package-static.bash
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-06-04 19:25:08 +0200
committerJakob Unterwurzacher2017-06-04 19:25:08 +0200
commit0ac5e44137e457dad2a7f5408fb475bf69c642fa (patch)
tree773334e5ccb2a54cc80a7246aeab4f1fbdd15fe3 /package-static.bash
parentd8d7c5c4faf509f436ccfe403bbda5517b6a97b1 (diff)
Add "package-static.bash" helper script
Creates a tar.gz with a static build of gocryptfs and the man page.
Diffstat (limited to 'package-static.bash')
-rwxr-xr-xpackage-static.bash25
1 files changed, 25 insertions, 0 deletions
diff --git a/package-static.bash b/package-static.bash
new file mode 100755
index 0000000..a30d649
--- /dev/null
+++ b/package-static.bash
@@ -0,0 +1,25 @@
+#!/bin/bash -eu
+
+cd $(dirname "$0")
+
+# Compiles the gocryptfs binary and sets $GITVERSION
+source build-without-openssl.bash
+
+if ldd gocryptfs > /dev/null ; then
+ echo "error: compiled binary is not static"
+ exit 1
+fi
+
+# Build gocryptfs.1 man page
+./Documentation/MANPAGE-render.bash > /dev/null
+cp -a ./Documentation/gocryptfs.1 .
+
+ARCH=$(go env GOARCH)
+OS=$(go env GOOS)
+
+TARGZ=gocryptfs_${GITVERSION}_${OS}-static_${ARCH}.tar.gz
+
+tar czf $TARGZ gocryptfs gocryptfs.1
+
+echo "Tar created."
+echo "Hint for signing: gpg -u 23A02740 --armor --detach-sig $TARGZ"