mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-02 22:24:26 +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:
parent
62f4486190
commit
403c0e6dab
|
@ -527,19 +527,21 @@ package_install_state() {
|
|||
}
|
||||
installdepends() {
|
||||
for depend in "${depends[@]}"; do
|
||||
if [ -z "$(package_install_state $depend)" ]; then
|
||||
# Split colon seperated string into a list
|
||||
IFS=':' read -ra port_directories <<< "$SERENITY_PORT_DIRS"
|
||||
for port_dir in "${port_directories[@]}"; do
|
||||
if [ -d "${port_dir}/$depend" ]; then
|
||||
(cd "${port_dir}/$depend" && ./package.sh --auto)
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
>&2 echo "Error: Dependency $depend could not be found."
|
||||
exit 1
|
||||
if [ -n "$(package_install_state $depend)" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Split colon separated string into a list
|
||||
IFS=':' read -ra port_directories <<< "$SERENITY_PORT_DIRS"
|
||||
for port_dir in "${port_directories[@]}"; do
|
||||
if [ -d "${port_dir}/$depend" ]; then
|
||||
(cd "${port_dir}/$depend" && ./package.sh --auto)
|
||||
continue 2
|
||||
fi
|
||||
done
|
||||
|
||||
>&2 echo "Error: Dependency $depend could not be found."
|
||||
exit 1
|
||||
done
|
||||
}
|
||||
uninstall() {
|
||||
|
|
Loading…
Reference in a new issue