contrib/oot.sh: allow an optional list argument
authorJean Privat <jean@pryen.org>
Fri, 11 May 2018 15:12:52 +0000 (11:12 -0400)
committerJean Privat <jean@pryen.org>
Fri, 11 May 2018 15:12:52 +0000 (11:12 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

contrib/oot.sh

index c9b7a67..f5238e2 100755 (executable)
@@ -39,6 +39,12 @@ trymake_oot() {
        ../misc/jenkins/trymake.sh "$name" "$dir" "$@"
 }
 
+list=
+if [ -f "$1" ]; then
+       list=$1
+       shift
+fi
+
 cmd="$1"
 shift
 
@@ -54,11 +60,15 @@ while read -r repo name; do
                trymake) trymake_oot "$@";;
                pre-build) trymake_oot pre-build;;
                all) update_oot; trymake_oot pre-build all check;;
-               ""|help) echo "usage: oot.sh command [arg...]"; exit 0;;
+               ""|help) echo "usage: oot.sh [list] command [arg...]"; exit 0;;
                *) echo >&2 "unknown command: $cmd"; exit 1;;
        esac
 done
 }
 
-process_list < oot.txt
-process_list < nitpm_packages.txt
+if [ -n "$list" ]; then
+       process_list < "$list"
+else
+       process_list < oot.txt
+       process_list < nitpm_packages.txt
+fi