Skip to content

Commit 5bdee0a

Browse files
committed
Update sync-native-runtime.sh
1 parent baa7030 commit 5bdee0a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

build/scripts/sync-native-runtime.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,22 @@ expand_source() {
8989
fi
9090

9191
if [[ -d "${path}" ]]; then
92-
shopt -s nullglob
93-
local zips=("${path}"/*.zip)
94-
shopt -u nullglob
95-
if (( ${#zips[@]} )); then
92+
local zip_list=()
93+
while IFS= read -r -d '' zip_file; do
94+
zip_list+=("${zip_file}")
95+
done < <(find "${path}" -maxdepth 1 -type f -iname '*.zip' -print0)
96+
97+
if (( ${#zip_list[@]} )); then
9698
local tmp
9799
tmp="$(mktemp -d)"
98100
CLEANUP_DIRS+=("${tmp}")
99-
for zip_file in "${zips[@]}"; do
101+
for zip_file in "${zip_list[@]}"; do
100102
unzip -q "${zip_file}" -d "${tmp}"
101103
done
102104
echo "${tmp}"
103105
return 0
104106
fi
107+
105108
echo "${path}"
106109
return 0
107110
fi

0 commit comments

Comments
 (0)