Skip to content

Commit 0edfea9

Browse files
committed
Use xargs for passing arguments to ar
1 parent c77e1c8 commit 0edfea9

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

libexec/build-monolith

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,13 @@ platform=$(uname)
2121
rm -f "${LIBV8_MONOLITH}"
2222
case "${platform}" in
2323
"SunOS")
24-
/usr/xpg4/bin/find . -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | while read -r obj; do
25-
ar cqS "${LIBV8_MONOLITH}" "${obj}"
26-
done
27-
ranlib "${LIBV8_MONOLITH}"
24+
/usr/xpg4/bin/find . -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | xargs ar cq "${LIBV8_MONOLITH}"
2825
;;
2926
"Darwin")
30-
/usr/bin/find . -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | while read -r obj; do
31-
/usr/bin/ar -cqS "${LIBV8_MONOLITH}" "${obj}"
32-
done
33-
/usr/bin/ranlib "${LIBV8_MONOLITH}"
27+
/usr/bin/find . -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | xargs /usr/bin/ar -cq "${LIBV8_MONOLITH}"
3428
;;
3529
"Linux")
36-
find . -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | while read -r obj; do
37-
ar -cq "${LIBV8_MONOLITH}" "${obj}"
38-
done
30+
find . -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | xargs ar -cq "${LIBV8_MONOLITH}"
3931
;;
4032
*)
4133
echo "Unsupported platform: ${platform}"

0 commit comments

Comments
 (0)