trees: don't continue if no argument given
main() used to be the only function executed from outside of main(), in this script, but now we source a config file and then run the build afterward. when a flag is provided without OPTARG, this means that we are continuing such action erroneously. to mitigate this, return 1 in that instance, and handle it in the line that calls main(), making it exit with zero status (success). Signed-off-by: Leah Rowe <leah@libreboot.org>audit2
parent
3365fca06a
commit
60d491e2bd
|
@ -40,7 +40,7 @@ main()
|
|||
./update trees $_f "$p" || $err "!./update trees $_f $p"
|
||||
[ "$XBMK_RELEASE" != "y" ] || singletree "$p" || \
|
||||
x_ rm -Rf "src/$p/$p"; continue
|
||||
done && return 0
|
||||
done && return 1
|
||||
|
||||
[ -f "config/git/$project/pkg.cfg" ] || $err "'$project' not defined"
|
||||
|
||||
|
@ -253,6 +253,6 @@ copy_elf()
|
|||
done < "$listfile"; x_ make clean -C "$srcdir"
|
||||
}
|
||||
|
||||
main $@
|
||||
main $@ || exit 0
|
||||
. "$mkhelpercfg"
|
||||
$cmd
|
||||
|
|
Loading…
Reference in New Issue