Re: [PATCH 1/3] kbuild: handle non-existing options in scripts/config

From: Andi Kleen
Date: Mon May 25 2009 - 09:05:58 EST

> -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


ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at