mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
daf2e5d335
This patch ensures that ./package.sh is run in the same shell This solves compiling issues when building certain ports. This fix was suggested by linusg in https://github.com/SerenityOS/serenity/issues/5783#issuecomment-798906817
65 lines
1.3 KiB
Bash
Executable File
65 lines
1.3 KiB
Bash
Executable File
#!/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
|
|
|
|
some_failed=false
|
|
|
|
for file in *; do
|
|
if [ -d $file ]; then
|
|
pushd $file > /dev/null
|
|
dirname=$(basename $file)
|
|
if [ "$clean" == true ]; then
|
|
if [ "$verbose" == true ]; then
|
|
./package.sh clean_all
|
|
else
|
|
./package.sh clean_all > /dev/null 2>&1
|
|
fi
|
|
fi
|
|
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
|
|
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
|
|
done
|
|
|
|
if [ "$some_failed" == false ]; then
|
|
exit 0
|
|
else
|
|
exit 1
|
|
fi
|