diff options
author | Pádraig Brady <P@draigBrady.com> | 2014-07-18 21:55:19 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2014-07-18 21:55:19 +0100 |
commit | 421e16ac0dbc21aaa140655cf16d26bd33fbc92c (patch) | |
tree | a88aa1a461e74adb3727ac303d253f01e085e2d1 | |
parent | 1b2438f0a1a211d19b7702067e4664063aa5ea19 (diff) | |
download | coreutils-421e16ac0dbc21aaa140655cf16d26bd33fbc92c.tar.xz |
build: port new bootstrap script to POSIX shells
* build-aux/gen-single-binary.sh: Avoid bash only constructs.
Reported by Assaf Gordon
-rwxr-xr-x | build-aux/gen-single-binary.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/build-aux/gen-single-binary.sh b/build-aux/gen-single-binary.sh index 463570656..a2423e60d 100755 --- a/build-aux/gen-single-binary.sh +++ b/build-aux/gen-single-binary.sh @@ -49,7 +49,8 @@ while read l; do if echo $l | grep -F '+=' >/dev/null; then eval "oldvalue=\${$var}" fi - eval "$var='$oldvalue "${value//\'/\'\"\'\"\'}"'" + value=$(echo "$value" | sed "s/'/'\"'\"'/g") + eval "$var='$oldvalue "$value"'" fi fi done < $LOCAL_MK @@ -60,15 +61,15 @@ echo "## Automatically generated by $me. DO NOT EDIT BY HAND!" # Override the sources for dir and vdir. We use a smaller version of dir and # vdir that relies on the ls main. src_dir_SOURCES="src/coreutils-dir.c" -src_dir_LDADD+=" src/libsinglebin_ls.a" +src_dir_LDADD="$src_dir_LDADD src/libsinglebin_ls.a" echo src_libsinglebin_dir_a_DEPENDENCIES = src/libsinglebin_ls.a src_vdir_SOURCES="src/coreutils-vdir.c" -src_vdir_LDADD+=" src/libsinglebin_ls.a" +src_vdir_LDADD="$src_vdir_LDADD src/libsinglebin_ls.a" echo src_libsinglebin_vdir_a_DEPENDENCIES = src/libsinglebin_ls.a # Override the sources for arch likewise, using the main from uname. src_arch_SOURCES="src/coreutils-arch.c" -src_arch_LDADD+=" src/libsinglebin_uname.a" +src_arch_LDADD="$src_arch_LDADD src/libsinglebin_uname.a" echo src_libsinglebin_arch_a_DEPENDENCIES = src/libsinglebin_uname.a for cmd in $ALL_PROGRAMS; do |