diff options
-rwxr-xr-x | conv | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -27,7 +27,7 @@ IFS=' s/^--- .*/&/; ' } | -while read line; do +while read -r line; do case "$line" in diff*) ;; index*) ;; @@ -70,7 +70,8 @@ if [ x"$1" = x"-i" ]; then # write patch if it doesn't already exist if [ -e $dir/$name ]; then f=`mktemp -t ${0##*/}` || exit 1 - echo error: $dir/$name already exists; saving to $f 1>&2 + printf '%s\n' "$patch" > $f + echo "error: $dir/$name already exists; saving to $f" 1>&2 exit 1 else printf '%s\n' "$patch" > $dir/$name |