mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-18 15:02:59 +02:00
make.sh: Add --quiet to run_command
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
26
make.sh
26
make.sh
@@ -743,6 +743,7 @@ run_command() {
|
||||
local actions=()
|
||||
|
||||
local chroot="false"
|
||||
local quiet="false"
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "${1}" in
|
||||
@@ -750,6 +751,10 @@ run_command() {
|
||||
chroot="true"
|
||||
;;
|
||||
|
||||
--quiet)
|
||||
quiet="true"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo "Unknown argument: ${1}" >&2
|
||||
return 2
|
||||
@@ -798,15 +803,20 @@ run_command() {
|
||||
r="$?"
|
||||
fi
|
||||
|
||||
# Print the runtime
|
||||
print_runtime "$(( SECONDS - t ))"
|
||||
# Show runtime and status unless quiet
|
||||
case "${quiet}" in
|
||||
false)
|
||||
# Print the runtime
|
||||
print_runtime "$(( SECONDS - t ))"
|
||||
|
||||
# All done
|
||||
if [ "${r}" -eq 0 ]; then
|
||||
print_status DONE
|
||||
else
|
||||
print_status FAIL
|
||||
fi
|
||||
# All done
|
||||
if [ "${r}" -eq 0 ]; then
|
||||
print_status DONE
|
||||
else
|
||||
print_status FAIL
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
return "${r}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user