diff options
author | Denys Vlasenko | 2010-11-24 15:06:49 +0100 |
---|---|---|
committer | Denys Vlasenko | 2010-11-24 15:06:49 +0100 |
commit | 749e305d3671368a8d08de002f5235298ed1ed53 (patch) | |
tree | b59f1b6b1e88e181c06a492b773328b2cee86cc6 /scripts | |
parent | 7386dd1e8a659616e1dab1b013986e4ba00a4835 (diff) | |
download | busybox-749e305d3671368a8d08de002f5235298ed1ed53.zip busybox-749e305d3671368a8d08de002f5235298ed1ed53.tar.gz |
build system: fix for dash
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/gen_build_files.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/gen_build_files.sh b/scripts/gen_build_files.sh index 130269b..ac8ccb9 100755 --- a/scripts/gen_build_files.sh +++ b/scripts/gen_build_files.sh @@ -18,14 +18,17 @@ generate() local src="$1" dst="$2" header="$3" insert="$4" #chk "${dst}" ( - echo "${header}" + # need to use printf: different shells have inconsistent + # rules re handling of "\n" in their params, + # and ${insert} definitely contains "\n" + printf "%s\n" "${header}" if grep -qs '^INSERT$' "${src}"; then sed -n '1,/^INSERT$/p' "${src}" - echo "${insert}" + printf "%s\n" "${insert}" sed -n '/^INSERT$/,$p' "${src}" else if [ -n "${insert}" ]; then - echo "ERROR: INSERT line missing in: ${src}" 1>&2 + printf "%s\n" "ERROR: INSERT line missing in: ${src}" 1>&2 fi cat "${src}" fi |