diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 8248485e9d..e61a2bb5ad 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -491,7 +491,7 @@ package_install_state() { installdepends() { for depend in "${depends[@]}"; do if [ -z "$(package_install_state $depend)" ]; then - (cd "../$depend" && ./package.sh --auto) + (cd "$(dirname $(grep -E port=${depend} ../*/package.sh))" && ./package.sh --auto) fi done }