aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
authorAlejandro Colomar <alx@kernel.org>2023-08-14 15:15:12 +0200
committerAlejandro Colomar <alx@kernel.org>2023-08-14 15:16:59 +0200
commit26ffcd4fa9a4f89ab60371e9c19fa39cae58634b (patch)
tree15e5cfa87bda27f0991962507da098eb4c4394f0 /scripts
parentd925b426da58fc4c5f8c0f8acab7e6e30611dee5 (diff)
downloadman-pages-26ffcd4fa9a4f89ab60371e9c19fa39cae58634b.tar.gz
scripts/sortman: Ignore only leading underscores or dashes
Underscores or dashes in the middle of words should be significant: man5/procfs.5 man5/proc.5 man5/proc_a.5 man5/proc_z.5 Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/sortman2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/sortman b/scripts/sortman
index 566326f422..01564fdce0 100755
--- a/scripts/sortman
+++ b/scripts/sortman
@@ -7,7 +7,7 @@ sed -E '/\/intro./ s/.*\.([[:digit:]])/\10\t&/' \
| sed -E '/\/intro./! s/.*\.([[:digit:]])\>/\11\t&/' \
| sed -E '/\/intro./! s/.*\.([[:digit:]])([[:alnum:]]+)/\12.\2\t&/' \
| sed -E ' s/\t(.*)/&\n\1/' \
-| sed -E '/\t/ s/([^[:digit:]])[_-]([^[:digit:]])/\1\2/g' \
+| sed -E '/\t/ s/\/[_-]*/\//g' \
| sed -E '/\t/ s/[_-]/_/g' \
| sed -E '/\t/ {N;s/\n/\t/;}' \
| sort -fV \