]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
new: sort group names
authorOmar Sandoval <osandov@fb.com>
Tue, 26 Jun 2018 18:49:59 +0000 (11:49 -0700)
committerOmar Sandoval <osandov@fb.com>
Tue, 26 Jun 2018 18:49:59 +0000 (11:49 -0700)
And replace the unnecessary bash loop with more find flags.

Signed-off-by: Omar Sandoval <osandov@fb.com>
new

diff --git a/new b/new
index 5c6e1eb3852d5d2836375f5c5458e91adcded349..095c68e172d4dda1d612de8fed35df904e869b36 100755 (executable)
--- a/new
+++ b/new
@@ -47,11 +47,7 @@ prompt_yes_no() {
 }
 
 echo "Available test groups:"
-while IFS= read -r -d '' group; do
-       if [[ $group != meta ]]; then
-               echo "    ${group}"
-       fi
-done < <(find tests -mindepth 1 -maxdepth 1 -type d -printf '%P\0')
+find tests -mindepth 1 -maxdepth 1 -type d -not -name meta -printf '    %P\n' | sort
 
 read -r -p "Category for new test (pick one of the above or create a new one): " group