aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-06-09 22:54:24 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-06-09 22:54:24 +0200
commitb570a6619609cb178f144e330b3360184fe4c156 (patch)
tree040a78704fb86ce4c561a5b730e627bb1f92dfa4
parente67c4cfb5fac5b75fcde34d379cad09bf28813aa (diff)
downloadpatches-b570a6619609cb178f144e330b3360184fe4c156.tar.gz
conv: Ensure correct patch name
-rwxr-xr-xconv7
1 files changed, 6 insertions, 1 deletions
diff --git a/conv b/conv
index ded047a..f5d2ebc 100755
--- a/conv
+++ b/conv
@@ -61,6 +61,11 @@ if [ x"$1" = x"-i" ]; then
read name </dev/tty
fi
+ case $name in
+ patch-*) ;;
+ *) name=patch-$name ;;
+ esac
+
# write patch if it doesn't already exist
if [ -e $dir/$name ]; then
f=`mktemp`
@@ -68,7 +73,7 @@ if [ x"$1" = x"-i" ]; then
exit 1
else
printf '%s\n' "$patch" > $dir/$name
- echo $dir/name 1>&2
+ echo $dir/$name 1>&2
fi
else
cat