summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Breitwieser2021-08-03 14:18:42 +0200
committerOliver Breitwieser2021-08-03 14:18:42 +0200
commit89234af71cf78d3ba263b7be8b7a22aaf3864a77 (patch)
tree256c09b106262347f272691c0ee97295ec8f72c9
parent7da8c9d826a652bb415b3f1fa60d585da3c78c70 (diff)
downloadaur-89234af71cf78d3ba263b7be8b7a22aaf3864a77.tar.gz
Ensure all manpages get generated
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD7
2 files changed, 5 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c54df6b343d4..96ee1101bf7d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = asfa-git
pkgdesc = share files by upload via ssh and generation of a non-guessable link
- pkgver = 0.9.0.r5.ge2992ad
+ pkgver = 0.9.0.r6.gd641370
pkgrel = 1
url = https://github.com/obreitwi/asfa
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 327d1c94a094..61d2cb81c828 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -61,9 +61,10 @@ build() {
_folder_man=target/release/man
mkdir -p ${_folder_man}/man1
help2man "${_path_bin}" > ${_folder_man}/man1/${_pkgname}.1
- # Find all named commands (except for aliases that need to be added afterwards)
- (find "src/cmd" -not -name "mod.rs" -type f -exec basename '{}' '.rs' \; ; echo "mv")\
- help2man "'$_path_bin' $cmd" > ${_folder_man}/man1/${_pkgname}-${cmd}.1
+ # Generate info about all subcommands except for 'help' (which leads to error)
+ "${_path_bin}" --help | awk 'enabled && $1 != "help" { print $1 } /^SUBCOMMANDS:$/ { enabled=1 }' \
+ | while read -r cmd; do
+ help2man "$_path_bin $cmd" > ${_folder_man}/man1/${_pkgname}-${cmd}.1
done
}