diff options
author | Leah Rowe <leah@libreboot.org> | 2023-10-02 22:00:59 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-10-02 22:00:59 +0100 |
commit | d9719cae49791258fe33e7d772aea180c3f2164c (patch) | |
tree | 281aa6e23c01592c8815543723a32988e500b9fc /script/handle/make/file | |
parent | cb29c96c74b6985ce3cd7f6f672b1d71a88c6fa6 (diff) |
handle/make/file: do multiple project arguments
At the end of the function, this script will now
run itself again if there are more arguments. This
enables the following:
./handle make file -c project1 project2 project3
Whereas previously, it could only do this:
./handle make file -c project1
Substitude -b and it's the same.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/handle/make/file')
-rwxr-xr-x | script/handle/make/file | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/script/handle/make/file b/script/handle/make/file index 600b9f3d..3bb8030f 100755 --- a/script/handle/make/file +++ b/script/handle/make/file @@ -7,13 +7,14 @@ set -u -e . "include/err.sh" -eval "$(setvars "" mode project)" +eval "$(setvars "" mode project _flag)" main() { while getopts b:c: option do - case "${1}" in + _flag="${1}" + case "${_flag}" in -b) : ;; -c) mode="distclean" ;; *) err "Invalid option" ;; @@ -25,6 +26,7 @@ main() handle_dependencies run_make_command + [ $# -gt 0 ] && x_ ./handle make file ${_flag} ${@} } handle_dependencies() @@ -47,7 +49,7 @@ run_make_command() x_ make -C "${project}" -j$(nproc) else x_ make -C "${project}" clean - make -C "${project}" distclean || : + make -C "${project}" distclean 2>/dev/null || : fi } |