From 4ea37d62c2b90e360a97c43ffdb10afabaac46d9 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 19 Oct 2011 21:17:20 +0200 Subject: gen_build_files.sh: simplify "print everything up to INSERT line" part Signed-off-by: Denys Vlasenko --- scripts/gen_build_files.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/gen_build_files.sh') 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() # rules re handling of "\n" in echo params. printf "%s\n" "${header}" # print everything up to INSERT line - sed -n '/^INSERT$/q;1,/^INSERT$/p' "${src}" + sed -n '/^INSERT$/ q; p' "${src}" # copy stdin to stdout cat # print everything after INSERT line - sed -n '/^INSERT$/{:l;n;p;bl}' "${src}" + sed -n '/^INSERT$/ { :l; n; p; bl }' "${src}" } >"${dst}.tmp" if ! cmp -s "${dst}" "${dst}.tmp"; then gen "${dst}" -- cgit v1.2.3