Duke Leto
5 years ago
2 changed files with 14 additions and 12 deletions
@ -1,28 +1,30 @@ |
|||
#!/bin/sh |
|||
# Copyright (c) 2019 The Hush developers |
|||
# Released under the GPLv3 |
|||
|
|||
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} |
|||
SRCDIR=${SRCDIR:-$TOPDIR/src} |
|||
MANDIR=${MANDIR:-$TOPDIR/doc/man} |
|||
|
|||
KOMODOD=${KOMODOD:-$SRCDIR/komodod} |
|||
KOMODOCLI=${KOMODOCLI:-$SRCDIR/komodo-cli} |
|||
KOMODOTX=${KOMODOTX:-$SRCDIR/komodo-tx} |
|||
HUSHD=${HUSHD:-$SRCDIR/hushd} |
|||
HUSHCLI=${HUSHCLI:-$SRCDIR/hush-cli} |
|||
HUSHTX=${HUSHTX:-$SRCDIR/hush-tx} |
|||
|
|||
[ ! -x $KOMODOD ] && echo "$KOMODOD not found or not executable." && exit 1 |
|||
[ ! -x $HUSHD ] && echo "$HUSHD not found or not executable." && exit 1 |
|||
|
|||
# The autodetected version git tag can screw up manpage output a little bit |
|||
KMDVER="v3.3.0" |
|||
#HUSHVER="v3.3.0" |
|||
HUSHVER=$(./src/hushd --version|head -n2|tail -n1|cut -d' ' -f4|cut -d- -f1) |
|||
|
|||
# Create a footer file with copyright content. |
|||
# This gets autodetected fine for komodod if --version-string is not set, |
|||
# but has different outcomes for komodo-cli. |
|||
echo "[COPYRIGHT]" > footer.h2m |
|||
$KOMODOD --version | sed -n '1!p' >> footer.h2m |
|||
$HUSHD --version | sed -n '1!p' >> footer.h2m |
|||
|
|||
for cmd in $KOMODOD $KOMODOCLI $KOMODOTX; do |
|||
for cmd in $HUSHD $HUSHCLI $HUSHTX; do |
|||
cmdname="${cmd##*/}" |
|||
help2man -N --version-string=${KMDVER} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd} |
|||
#sed -i "s/\\\-${KMDVER[1]}//g" ${MANDIR}/${cmdname}.1 |
|||
help2man -N --version-string=${HUSHVER} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd} |
|||
#sed -i "s/\\\-${HUSHVER[1]}//g" ${MANDIR}/${cmdname}.1 |
|||
done |
|||
|
|||
rm -f footer.h2m |
|||
|
Loading…
Reference in new issue