From: Alejandro Colomar Date: Mon, 14 Aug 2023 13:15:12 +0000 (+0200) Subject: scripts/sortman: Ignore only leading underscores or dashes X-Git-Tag: man-pages-6.06~322 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26ffcd4fa9a4f89ab60371e9c19fa39cae58634b;p=thirdparty%2Fman-pages.git 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 --- 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 \