diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-10-19 21:17:20 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-10-19 21:17:20 +0200 |
| commit | 4ea37d62c2b90e360a97c43ffdb10afabaac46d9 (patch) | |
| tree | 70a1af033aa6694beb460a4eecb2326f23c07df6 /scripts | |
| parent | efd08bfa0adab3ae299be7abdd45161a15804a3b (diff) | |
| download | busybox-w32-4ea37d62c2b90e360a97c43ffdb10afabaac46d9.tar.gz busybox-w32-4ea37d62c2b90e360a97c43ffdb10afabaac46d9.tar.bz2 busybox-w32-4ea37d62c2b90e360a97c43ffdb10afabaac46d9.zip | |
gen_build_files.sh: simplify "print everything up to INSERT line" part
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/gen_build_files.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/gen_build_files.sh b/scripts/gen_build_files.sh index 1a3d3e9b8..c42fe9fbb 100755 --- a/scripts/gen_build_files.sh +++ b/scripts/gen_build_files.sh | |||
| @@ -27,11 +27,11 @@ generate() | |||
| 27 | # rules re handling of "\n" in echo params. | 27 | # rules re handling of "\n" in echo params. |
| 28 | printf "%s\n" "${header}" | 28 | printf "%s\n" "${header}" |
| 29 | # print everything up to INSERT line | 29 | # print everything up to INSERT line |
| 30 | sed -n '/^INSERT$/q;1,/^INSERT$/p' "${src}" | 30 | sed -n '/^INSERT$/ q; p' "${src}" |
| 31 | # copy stdin to stdout | 31 | # copy stdin to stdout |
| 32 | cat | 32 | cat |
| 33 | # print everything after INSERT line | 33 | # print everything after INSERT line |
| 34 | sed -n '/^INSERT$/{:l;n;p;bl}' "${src}" | 34 | sed -n '/^INSERT$/ { :l; n; p; bl }' "${src}" |
| 35 | } >"${dst}.tmp" | 35 | } >"${dst}.tmp" |
| 36 | if ! cmp -s "${dst}" "${dst}.tmp"; then | 36 | if ! cmp -s "${dst}" "${dst}.tmp"; then |
| 37 | gen "${dst}" | 37 | gen "${dst}" |
