mirror of
https://github.com/RGBCube/serenity
synced 2025-07-29 11:37:45 +00:00
Ports: Build ports only once when running build_all.sh
Previously we'd end up building some ports multiple times, e.g. as a dependency for another port. This changes the build_all.sh script so that it builds ports only once.
This commit is contained in:
parent
8a95408673
commit
4115fcc933
2 changed files with 25 additions and 2 deletions
|
@ -26,11 +26,31 @@ case "$2" in
|
|||
esac
|
||||
|
||||
some_failed=false
|
||||
built_ports=""
|
||||
|
||||
for file in *; do
|
||||
if [ -d $file ]; then
|
||||
pushd $file > /dev/null
|
||||
port=$(basename $file)
|
||||
port_built=0
|
||||
for built_port in $built_ports; do
|
||||
if [ "$built_port" = "$port" ]; then
|
||||
port_built=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ $port_built -eq 1 ]; then
|
||||
echo "Already built $port as a dependency."
|
||||
popd > /dev/null
|
||||
continue
|
||||
fi
|
||||
if ! [ -f package.sh ]; then
|
||||
echo "ERROR: Skipping $port because its package.sh script is missing."
|
||||
popd > /dev/null
|
||||
continue
|
||||
fi
|
||||
built_ports="$built_ports $port $(./package.sh showdepends) "
|
||||
|
||||
if [ "$clean" == true ]; then
|
||||
if [ "$verbose" == true ]; then
|
||||
./package.sh clean_all
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue