mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-30 03:20:28 +00:00
8cdbad3c7a
The packages.db file now resides in Serenity's root.
42 lines
938 B
Bash
Executable file
42 lines
938 B
Bash
Executable file
#!/usr/bin/env bash
|
|
. ".hosted_defs.sh"
|
|
|
|
packagesdb="${SERENITY_INSTALL_ROOT}/usr/Ports/packages.db"
|
|
|
|
clean=false
|
|
case "$1" in
|
|
clean)
|
|
clean=true
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
|
|
some_failed=false
|
|
|
|
while IFS= read -r line; do
|
|
port="$(echo "$line" | cut -d' ' -f2)"
|
|
if [ -d "$port" ]; then
|
|
pushd $port > /dev/null
|
|
dirname=$(basename $port)
|
|
if [ "$clean" == true ]; then
|
|
./package.sh clean_all
|
|
fi
|
|
if ./package.sh; then
|
|
echo "Built ${dirname}."
|
|
else
|
|
echo "ERROR: Build of ${dirname} was not successful!"
|
|
some_failed=true
|
|
fi
|
|
popd > /dev/null
|
|
else
|
|
echo "ERROR: Previously installed port $port doesn't exist!"
|
|
some_failed=true
|
|
fi
|
|
done < <(grep -E "^(auto|manual)" "$packagesdb")
|
|
|
|
if [ "$some_failed" == false ]; then
|
|
exit 0
|
|
else
|
|
exit 1
|
|
fi
|