Skip to content

Commit 04a44cf

Browse files
committed
Restore POSIX compatibility of the configure script
find is not a POSIX tool
1 parent 1282f56 commit 04a44cf

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

configure

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -702,12 +702,13 @@ for lib in $generated_META $lbytes; do
702702
echo "Configuration for $lib written to site-lib-src/$lib/META"
703703
done
704704

705-
# create META from META.in in POSIX-compatible & safe way
706-
# see: https://www.shellcheck.net/wiki/SC2044
707-
meta_subst="sed -e 's/@VERSION@/$version/g' \
708-
-e 's/@REQUIRES@/${req_bytes}/g' \
709-
\"\$1\" > \"\${1%.in}\""
710-
find src -name 'META.in' -type f -exec sh -c "$meta_subst" sh {} \;
705+
for part in src/*; do
706+
if [ -f "$part/META.in" ]; then
707+
sed -e "s/@VERSION@/$version/g" \
708+
-e "s/@REQUIRES@/${req_bytes}/g" \
709+
"$part/META.in" > "$part/META"
710+
fi
711+
done
711712

712713
######################################################################
713714

0 commit comments

Comments
 (0)