aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconv5
1 files changed, 3 insertions, 2 deletions
diff --git a/conv b/conv
index c7b6ffb..06f5079 100755
--- a/conv
+++ b/conv
@@ -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