summaryrefslogtreecommitdiff
path: root/Ports
diff options
context:
space:
mode:
authorTom Needham <06needhamt@gmail.com>2021-03-14 12:14:22 +0000
committerAndreas Kling <kling@serenityos.org>2021-03-15 09:07:17 +0100
commit26d72d3048bac0552b3e513b85b8585acef3723e (patch)
tree12c80a50e05fcc0952f91df8e1b0bcb09ab5df47 /Ports
parent3c35ea30cc9861bca3825a71706333d88916ec15 (diff)
downloadserenity-26d72d3048bac0552b3e513b85b8585acef3723e.zip
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
Diffstat (limited to 'Ports')
-rwxr-xr-xPorts/build_all.sh39
1 files changed, 34 insertions, 5 deletions
diff --git a/Ports/build_all.sh b/Ports/build_all.sh
index 1f69bd3862..9719dd7d48 100755
--- a/Ports/build_all.sh
+++ b/Ports/build_all.sh
@@ -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