aboutsummaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-23 20:53:19 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-23 20:54:15 +1200
commite220321f50e3f4ef48136e6c489b9c615e2c8345 (patch)
treec6d9f6d8f512824e0bff5933a856b6c266ff9ada /check
parent8c2588dffd8404867fed65832a1f35cf804350b3 (diff)
downloaddotfiles-e220321f50e3f4ef48136e6c489b9c615e2c8345.tar.gz
Use saner approach to check/man file listing
Diffstat (limited to 'check')
-rwxr-xr-xcheck/man20
1 files changed, 8 insertions, 12 deletions
diff --git a/check/man b/check/man
index 802f5b3c..7591d1af 100755
--- a/check/man
+++ b/check/man
@@ -15,18 +15,14 @@ done
td=$(mktd test-man) || exit
# Get lists of logical binaries and manual pages
-for dir in bin games ; do (
- cd -- "$dir"
- pa *
-) done |
-sed 's/\...*$//' |
-sort | uniq > "$td"/bin
-for dir in man/man[168] ; do (
- cd -- "$dir"
- pa *.[168]
-) done |
-sed 's/\.[168]$//' |
-sort | uniq > "$td"/man
+# shellcheck disable=SC2016
+find bin games -type f -print |
+ sed 's_.*/__;s_\..*$__' |
+ sort | uniq > "$td"/bin
+# shellcheck disable=SC2016
+find man/man[168] -type f -name '*.[168]' -print |
+ sed 's_.*/__;s_\..*$__' |
+ sort | uniq > "$td"/man
# Get lists of noman scripts and nobin manual pages
comm -23 "$td"/bin "$td"/man > "$td"/noman