Skip to content

Commit

Permalink
Use xargs for passing arguments to ar
Browse files Browse the repository at this point in the history
  • Loading branch information
nightpool committed Jan 18, 2022
1 parent c77e1c8 commit 0edfea9
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions libexec/build-monolith
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,13 @@ platform=$(uname)
rm -f "${LIBV8_MONOLITH}"
case "${platform}" in
"SunOS")
/usr/xpg4/bin/find . -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | while read -r obj; do
ar cqS "${LIBV8_MONOLITH}" "${obj}"
done
ranlib "${LIBV8_MONOLITH}"
/usr/xpg4/bin/find . -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | xargs ar cq "${LIBV8_MONOLITH}"
;;
"Darwin")
/usr/bin/find . -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | while read -r obj; do
/usr/bin/ar -cqS "${LIBV8_MONOLITH}" "${obj}"
done
/usr/bin/ranlib "${LIBV8_MONOLITH}"
/usr/bin/find . -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | xargs /usr/bin/ar -cq "${LIBV8_MONOLITH}"
;;
"Linux")
find . -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | while read -r obj; do
ar -cq "${LIBV8_MONOLITH}" "${obj}"
done
find . -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | xargs ar -cq "${LIBV8_MONOLITH}"
;;
*)
echo "Unsupported platform: ${platform}"
Expand Down

0 comments on commit 0edfea9

Please sign in to comment.