1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:37:44 +00:00

Ports: Install all dependencies instead of just one

Commit 9b7e217dda broke installation of port dependencies by
`return`ing as soon as the first dependency was found.
This commit is contained in:
Jelle Raaijmakers 2023-02-01 22:05:40 +01:00 committed by Andreas Kling
parent 62f4486190
commit 403c0e6dab

View file

@ -527,19 +527,21 @@ package_install_state() {
} }
installdepends() { installdepends() {
for depend in "${depends[@]}"; do for depend in "${depends[@]}"; do
if [ -z "$(package_install_state $depend)" ]; then if [ -n "$(package_install_state $depend)" ]; then
# Split colon seperated string into a list continue
fi
# Split colon separated string into a list
IFS=':' read -ra port_directories <<< "$SERENITY_PORT_DIRS" IFS=':' read -ra port_directories <<< "$SERENITY_PORT_DIRS"
for port_dir in "${port_directories[@]}"; do for port_dir in "${port_directories[@]}"; do
if [ -d "${port_dir}/$depend" ]; then if [ -d "${port_dir}/$depend" ]; then
(cd "${port_dir}/$depend" && ./package.sh --auto) (cd "${port_dir}/$depend" && ./package.sh --auto)
return continue 2
fi fi
done done
>&2 echo "Error: Dependency $depend could not be found." >&2 echo "Error: Dependency $depend could not be found."
exit 1 exit 1
fi
done done
} }
uninstall() { uninstall() {