mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:37:44 +00:00
Ports/build_all: Read port directory names into an array immediately
The script previously failed early after building `mandoc`, as it failed to switch to the correct directory for the next port. With this change, the script now runs to completion.
This commit is contained in:
parent
b13fe9397d
commit
81d9a6f44a
1 changed files with 3 additions and 2 deletions
|
@ -61,7 +61,8 @@ do_clean_port() {
|
||||||
}
|
}
|
||||||
|
|
||||||
ports_dir=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
|
ports_dir=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
|
||||||
while IFS= read -r -d '' port_dir; do
|
mapfile -d '' directories < <(find "$ports_dir" -mindepth 1 -maxdepth 1 -type d -print0 | sort -z)
|
||||||
|
for port_dir in "${directories[@]}"; do
|
||||||
port_name="$(basename "$port_dir")"
|
port_name="$(basename "$port_dir")"
|
||||||
if [[ " ${processed_ports[*]} " == *" $port_name "* ]]; then
|
if [[ " ${processed_ports[*]} " == *" $port_name "* ]]; then
|
||||||
log_info "$port_name is already processed"
|
log_info "$port_name is already processed"
|
||||||
|
@ -105,7 +106,7 @@ while IFS= read -r -d '' port_dir; do
|
||||||
|
|
||||||
# shellcheck disable=SC2207
|
# shellcheck disable=SC2207
|
||||||
processed_ports+=("$port_name" $(./package.sh showproperty depends))
|
processed_ports+=("$port_name" $(./package.sh showproperty depends))
|
||||||
done < <(find "$ports_dir" -mindepth 1 -maxdepth 1 -type d -print0 | sort -z)
|
done
|
||||||
|
|
||||||
if $some_failed; then
|
if $some_failed; then
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue