Ports: Allow verbose argument in build_all.sh
This patch allows for a verbose argument to be passed so that the build output of the individual builds is printed to stdout instead of /dev/null to help with diagnosing errors If the verbose argument is not passed the old behaviour is preserved and the build output is printed to /dev/null
This commit is contained in:
parent
3c35ea30cc
commit
26d72d3048
Notes:
sideshowbarker
2024-07-18 21:20:49 +09:00
Author: https://github.com/06needhamt 🔰 Commit: https://github.com/SerenityOS/serenity/commit/26d72d3048b Pull-request: https://github.com/SerenityOS/serenity/pull/5782 Issue: https://github.com/SerenityOS/serenity/issues/5783
1 changed files with 34 additions and 5 deletions
|
@ -1,10 +1,26 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
clean=false
|
||||
verbose=false
|
||||
|
||||
case "$1" in
|
||||
clean)
|
||||
clean=true
|
||||
;;
|
||||
verbose)
|
||||
verbose=true
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$2" in
|
||||
clean)
|
||||
clean=true
|
||||
;;
|
||||
verbose)
|
||||
verbose=true
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
@ -16,13 +32,26 @@ for file in *; do
|
|||
pushd $file > /dev/null
|
||||
dirname=$(basename $file)
|
||||
if [ "$clean" == true ]; then
|
||||
./package.sh clean_all > /dev/null 2>&1
|
||||
if [ "$verbose" == true ]; then
|
||||
./package.sh clean_all
|
||||
else
|
||||
./package.sh clean_all > /dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
if $(./package.sh > /dev/null 2>&1 ); then
|
||||
echo "Built ${dirname}."
|
||||
if [ "$verbose" == true ]; then
|
||||
if $(./package.sh); then
|
||||
echo "Built ${dirname}."
|
||||
else
|
||||
echo "ERROR: Build of ${dirname} was not successful!"
|
||||
some_failed=true
|
||||
fi
|
||||
else
|
||||
echo "ERROR: Build of ${dirname} was not successful!"
|
||||
some_failed=true
|
||||
if $(./package.sh > /dev/null 2>&1); then
|
||||
echo "Built ${dirname}."
|
||||
else
|
||||
echo "ERROR: Build of ${dirname} was not successful!"
|
||||
some_failed=true
|
||||
fi
|
||||
fi
|
||||
popd > /dev/null
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue