2021-01-22 11:44:05 -05:00
|
|
|
#!/usr/bin/env bash
|
2020-02-03 19:04:45 -05:00
|
|
|
|
|
|
|
clean=false
|
2021-03-14 08:14:22 -04:00
|
|
|
verbose=false
|
|
|
|
|
2020-02-03 19:04:45 -05:00
|
|
|
case "$1" in
|
|
|
|
clean)
|
|
|
|
clean=true
|
|
|
|
;;
|
2021-03-14 08:14:22 -04:00
|
|
|
verbose)
|
|
|
|
verbose=true
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "$2" in
|
|
|
|
clean)
|
|
|
|
clean=true
|
|
|
|
;;
|
|
|
|
verbose)
|
|
|
|
verbose=true
|
|
|
|
;;
|
2020-02-03 19:04:45 -05:00
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
some_failed=false
|
|
|
|
|
|
|
|
for file in *; do
|
|
|
|
if [ -d $file ]; then
|
|
|
|
pushd $file > /dev/null
|
2021-04-21 16:50:59 -04:00
|
|
|
port=$(basename $file)
|
2020-02-03 19:04:45 -05:00
|
|
|
if [ "$clean" == true ]; then
|
2021-03-14 08:14:22 -04:00
|
|
|
if [ "$verbose" == true ]; then
|
|
|
|
./package.sh clean_all
|
|
|
|
else
|
|
|
|
./package.sh clean_all > /dev/null 2>&1
|
|
|
|
fi
|
2020-02-03 19:04:45 -05:00
|
|
|
fi
|
2021-03-14 08:14:22 -04:00
|
|
|
if [ "$verbose" == true ]; then
|
2021-03-14 10:27:17 -04:00
|
|
|
if ./package.sh; then
|
2021-04-21 16:50:59 -04:00
|
|
|
echo "Built ${port}."
|
2021-03-14 08:14:22 -04:00
|
|
|
else
|
2021-04-21 16:50:59 -04:00
|
|
|
echo "ERROR: Build of ${port} was not successful!"
|
2021-03-14 08:14:22 -04:00
|
|
|
some_failed=true
|
|
|
|
fi
|
2020-02-03 19:04:45 -05:00
|
|
|
else
|
2021-03-14 10:27:17 -04:00
|
|
|
if ./package.sh > /dev/null 2>&1; then
|
2021-04-21 16:50:59 -04:00
|
|
|
echo "Built ${port}."
|
2021-03-14 08:14:22 -04:00
|
|
|
else
|
2021-04-21 16:50:59 -04:00
|
|
|
echo "ERROR: Build of ${port} was not successful!"
|
2021-03-14 08:14:22 -04:00
|
|
|
some_failed=true
|
|
|
|
fi
|
2020-02-03 19:04:45 -05:00
|
|
|
fi
|
|
|
|
popd > /dev/null
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ "$some_failed" == false ]; then
|
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
exit 1
|
2021-01-03 08:47:42 -05:00
|
|
|
fi
|