packakge.bash: include rendered man page in tarball

This commit is contained in:
Jakob Unterwurzacher 2016-11-01 15:43:33 +01:00
parent 944eaf2fb5
commit e993fd5fbc
4 changed files with 15 additions and 6 deletions

3
.gitignore vendored
View File

@ -10,3 +10,6 @@
# Binaries created for cpu profiling # Binaries created for cpu profiling
*.test *.test
# Rendered manpage
gocryptfs.1

View File

@ -1,2 +0,0 @@
# Rendered manpage
*.1

View File

@ -1,7 +1,11 @@
#!/bin/bash #!/bin/bash
set -eux set -eu
cd $(dirname "$0")
OUT=gocryptfs.1
# Render MANPAGE.md to a proper man(1) manpage # Render MANPAGE.md to a proper man(1) manpage
cd ${0%/*} echo ".\\\" This is a man page. View it using 'man ./$OUT'" > $OUT
pandoc MANPAGE.md -s -t man -o gocryptfs.1 && man ./gocryptfs.1 echo ".\\\"" >> $OUT
pandoc MANPAGE.md -s -t man >> $OUT && man ./gocryptfs.1

View File

@ -1,14 +1,18 @@
#!/bin/bash #!/bin/bash
set -eu set -eu
cd $(dirname "$0")
source build.bash # Builds binary and sets GITVERSION (example: v0.7-15-gf01f599) 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) source /etc/os-release # Sets ID (example: fedora) and VERSION_ID (example: 23)
ARCH=$(go env GOARCH) 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 TARGZ=gocryptfs_${GITVERSION}_${ID}${VERSION_ID}_${ARCH}.tar.gz
tar czf $TARGZ gocryptfs tar czf $TARGZ gocryptfs gocryptfs.1
echo "Tar created." echo "Tar created."
echo "Hint for signing: gpg -u 23A02740 --armor --detach-sig $TARGZ" echo "Hint for signing: gpg -u 23A02740 --armor --detach-sig $TARGZ"