aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-11-01 15:43:33 +0100
committerJakob Unterwurzacher2016-11-01 15:43:33 +0100
commite993fd5fbcf8c261cc71fcb96b7fb48dcae8eb2b (patch)
treef947e71d359ffae77276ff8bea68de99fb5b19ce
parent944eaf2fb507265d41db5685b1c8d902e20e52da (diff)
packakge.bash: include rendered man page in tarball
-rw-r--r--.gitignore3
-rw-r--r--Documentation/.gitignore2
-rwxr-xr-xDocumentation/MANPAGE-render.bash10
-rwxr-xr-xpackage.bash6
4 files changed, 15 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 46b5726..1ffd82d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,6 @@
# Binaries created for cpu profiling
*.test
+
+# Rendered manpage
+gocryptfs.1
diff --git a/Documentation/.gitignore b/Documentation/.gitignore
deleted file mode 100644
index e35bb1d..0000000
--- a/Documentation/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-# Rendered manpage
-*.1
diff --git a/Documentation/MANPAGE-render.bash b/Documentation/MANPAGE-render.bash
index f4e9743..138f4d6 100755
--- a/Documentation/MANPAGE-render.bash
+++ b/Documentation/MANPAGE-render.bash
@@ -1,7 +1,11 @@
#!/bin/bash
-set -eux
+set -eu
+cd $(dirname "$0")
+
+OUT=gocryptfs.1
# Render MANPAGE.md to a proper man(1) manpage
-cd ${0%/*}
-pandoc MANPAGE.md -s -t man -o gocryptfs.1 && man ./gocryptfs.1
+echo ".\\\" This is a man page. View it using 'man ./$OUT'" > $OUT
+echo ".\\\"" >> $OUT
+pandoc MANPAGE.md -s -t man >> $OUT && man ./gocryptfs.1
diff --git a/package.bash b/package.bash
index cd571ec..d3b95fd 100755
--- a/package.bash
+++ b/package.bash
@@ -1,14 +1,18 @@
#!/bin/bash
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)
ARCH=$(go env GOARCH)
+# Build gocryptfs.1 man page
+./Documentation/MANPAGE-render.bash > /dev/null
+cp -a ./Documentation/gocryptfs.1 .
TARGZ=gocryptfs_${GITVERSION}_${ID}${VERSION_ID}_${ARCH}.tar.gz
-tar czf $TARGZ gocryptfs
+tar czf $TARGZ gocryptfs gocryptfs.1
echo "Tar created."
echo "Hint for signing: gpg -u 23A02740 --armor --detach-sig $TARGZ"