public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Michal Marek <mmarek@suse.cz>
Cc: Andi Kleen <andi@firstfloor.org>, Sam Ravnborg <sam@ravnborg.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] kbuild: handle non-existing options in scripts/config
Date: Mon, 25 May 2009 15:11:44 +0200	[thread overview]
Message-ID: <20090525131144.GZ846@one.firstfloor.org> (raw)
In-Reply-To: <20090525125540.GB12943@sepie.suse.cz>

> -replace() {
> -	sed -i -e "$@" $FN
> +# set_var name value [before-var]
> +set_var() {
> +	awk -vvar="$1" -vnew="$2" -vbefore="$3" '

This seems rather complicated compared to what was there before.

I would just cmp the output file to the input file and if they are
the same then add it at the end with a echo

> +	}
> +	' "$FN" >"$FN.tmp"

This should be a &&, otherwise you risk removing the output file
on ctrl-c

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

  reply	other threads:[~2009-05-25 13:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1243255664.git.mmarek@suse.cz>
2009-05-25 12:55 ` [PATCH 1/3] kbuild: handle non-existing options in scripts/config Michal Marek
2009-05-25 13:11   ` Andi Kleen [this message]
2009-05-25 13:21     ` Michal Marek
2009-05-25 12:55 ` [PATCH 2/3] kbuild: simplify argument loop " Michal Marek
2009-05-25 12:55 ` [PATCH 3/3] kbuild: add generic --set option to scripts/config Michal Marek
2009-05-25 13:13   ` Andi Kleen
2009-05-25 13:25     ` Michal Marek
     [not found] <cover.1243262102.git.mmarek@suse.cz>
2009-05-25 14:43 ` [PATCH 1/3] kbuild: handle non-existing options in scripts/config Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090525131144.GZ846@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox