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