summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-08-21 23:55:18 +0200
committerAlejandro Colomar <alx@kernel.org>2023-08-21 23:55:37 +0200
commita04e93998bebba77ac799dd89c11042c25f2e2d2 (patch)
tree63376feaf2d50acace581d8ecff641de46ed4f2a /scripts
parent0569afbbccd6de28d1bacd13471a679ad2674aa1 (diff)
scripts/sortman: Sort 'cat' before 'catatonic'
Reported-by: Deri James <deri@chuzzlewit.myzen.co.uk> Cc: Brian Inglis <Brian.Inglis@Shaw.ca> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/sortman3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/sortman b/scripts/sortman
index 546a7943d..a8f70bab5 100755
--- a/scripts/sortman
+++ b/scripts/sortman
@@ -7,8 +7,9 @@ sed -E '/\/intro./ s/.*\.([[:digit:]])/\10\t&/' \
| sed -E '/\/intro./! s/.*\.([[:digit:]])\>/\11\t&/' \
| sed -E '/\/intro./! s/.*\.([[:digit:]])([[:alpha:]][[:alnum:]]*\>)/\12.\2\t&/' \
| sed -E ' s/\t(.*)/&\n\1/' \
+| sed -E '/\t/ s/\.[[:digit:]]([[:alpha:]][[:alnum:]]*)?\>.*//' \
| sed -E '/\t/ s/\/[_-]*/\//g' \
| sed -E '/\t/ s/[_-]/_/g' \
| sed -E '/\t/ {N;s/\n/\t/;}' \
-| sort -fV \
+| sort -fV -k1,2 \
| cut -f3;