Update gen-manpages.sh to autodetect hushd version
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
Contents
|
# Contrib Devtools
|
||||||
===========
|
|
||||||
This directory contains tools for developers working on this repository.
|
This directory contains tools for developers working on this repository.
|
||||||
|
|
||||||
github-merge.sh
|
github-merge.sh
|
||||||
|
|||||||
@@ -1,28 +1,30 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# Copyright (c) 2019 The Hush developers
|
||||||
|
# Released under the GPLv3
|
||||||
|
|
||||||
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
|
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
|
||||||
SRCDIR=${SRCDIR:-$TOPDIR/src}
|
SRCDIR=${SRCDIR:-$TOPDIR/src}
|
||||||
MANDIR=${MANDIR:-$TOPDIR/doc/man}
|
MANDIR=${MANDIR:-$TOPDIR/doc/man}
|
||||||
|
|
||||||
KOMODOD=${KOMODOD:-$SRCDIR/komodod}
|
HUSHD=${HUSHD:-$SRCDIR/hushd}
|
||||||
KOMODOCLI=${KOMODOCLI:-$SRCDIR/komodo-cli}
|
HUSHCLI=${HUSHCLI:-$SRCDIR/hush-cli}
|
||||||
KOMODOTX=${KOMODOTX:-$SRCDIR/komodo-tx}
|
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
|
#HUSHVER="v3.3.0"
|
||||||
KMDVER="v3.3.0"
|
HUSHVER=$(./src/hushd --version|head -n2|tail -n1|cut -d' ' -f4|cut -d- -f1)
|
||||||
|
|
||||||
# Create a footer file with copyright content.
|
# Create a footer file with copyright content.
|
||||||
# This gets autodetected fine for komodod if --version-string is not set,
|
# This gets autodetected fine for komodod if --version-string is not set,
|
||||||
# but has different outcomes for komodo-cli.
|
# but has different outcomes for komodo-cli.
|
||||||
echo "[COPYRIGHT]" > footer.h2m
|
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##*/}"
|
cmdname="${cmd##*/}"
|
||||||
help2man -N --version-string=${KMDVER} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd}
|
help2man -N --version-string=${HUSHVER} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd}
|
||||||
#sed -i "s/\\\-${KMDVER[1]}//g" ${MANDIR}/${cmdname}.1
|
#sed -i "s/\\\-${HUSHVER[1]}//g" ${MANDIR}/${cmdname}.1
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -f footer.h2m
|
rm -f footer.h2m
|
||||||
|
|||||||
Reference in New Issue
Block a user