Skip to content

Commit 4b0cf4d

Browse files
committed
autotools: Fix compatibility with POSIX shell
This drops support for libtool archives where names have newlines but this seems like so esoteric thing to support that it's unlikely to have any real impact.
1 parent 85ebf8a commit 4b0cf4d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/buildstream_plugins/elements/autotools.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,17 @@ variables:
7979
remove-libtool-libraries: "false"
8080

8181
delete-libtool-archives: |
82-
if %{remove-libtool-modules} || %{remove-libtool-libraries}; then
83-
find "%{install-root}" -name "*.la" -print0 | while read -d '' -r file; do
84-
if grep '^shouldnotlink=yes$' "${file}" &>/dev/null; then
85-
if %{remove-libtool-modules}; then
82+
if [ "%{remove-libtool-modules}" = "true" ] || [ "%{remove-libtool-libraries}" = "true" ]; then
83+
find "%{install-root}" -name "*.la" | while IFS= read -r file; do
84+
if grep '^shouldnotlink=yes$' "${file}" >/dev/null 2>&1; then
85+
if [ "%{remove-libtool-modules}" = "true" ]; then
8686
echo "Removing ${file}."
8787
rm "${file}"
8888
else
8989
echo "Not removing ${file}."
9090
fi
9191
else
92-
if %{remove-libtool-libraries}; then
92+
if [ "%{remove-libtool-libraries}" = "true" ]; then
9393
echo "Removing ${file}."
9494
rm "${file}"
9595
else
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
98ae7c344c01c64d2597338ec632e22a36f1b78ce502a9f3ed668edd0921dcb3
1+
1f566532b409f730be288e6138439236d65330c98269fc5956b12e02295c433b
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3dc2ed8ab56f9c706e1fbf4bacc1ab1e38d20f66c686f1ab05d5ad0e504272fc
1+
9219dea2e49b451bbd2f8f8797ac43a31b957b51919171a3449e4d8870d2bc62

0 commit comments

Comments
 (0)