diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | bootstrap | 17 |
2 files changed, 13 insertions, 9 deletions
@@ -1,5 +1,10 @@ 2006-09-08 Jim Meyering <jim@meyering.net> + * bootstrap (cp_mark_as_generated): Don't use "local", to + accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues. + Rename now-global "$src" and "$dst" to have cp_ prefix. + Safer, and avoids confusion. + * bootstrap (cp_mark_as_generated): New function. (slurp): Use it to prepend editor hints and a warning that the file we're copying is generated. @@ -214,26 +214,25 @@ esac cp_mark_as_generated() { - local src=$1 - local dst=$2 - local c1 c2 - case $dst in + cp_src=$1 + cp_dst=$2 + case $cp_dst in *.[ch]) c1='/* '; c2=' */';; *.texi) c1='@c '; c2= ;; - *.m4|*/Make*|Make*) c1='# '; c2= ;; - *) ;; + *.m4|*/Make*|Make*) c1='# ' ; c2= ;; + *) c1= ; c2= ;; esac if test -z "$c1"; then - cp "$src" "$dst" + cp "$cp_src" "$cp_dst" return fi ( echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" - cat "$src" - ) >> "$dst" + cat "$cp_src" + ) >> "$cp_dst" } slurp() { |