summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--quilt.changes1
-rw-r--r--quilt/rename.in24
2 files changed, 13 insertions, 12 deletions
diff --git a/quilt.changes b/quilt.changes
index 32e2d79..2f19884 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -2,6 +2,7 @@
Wed Dec 5 14:44:13 CET 2012 - jdelvare@suse.de
- top: Fix parameter quoting.
+- rename: Fix parameter quoting.
-------------------------------------------------------------------
Wed Dec 5 14:43:58 CET 2012 - jdelvare@suse.de
diff --git a/quilt/rename.in b/quilt/rename.in
index b7aa447..9636962 100644
--- a/quilt/rename.in
+++ b/quilt/rename.in
@@ -58,7 +58,7 @@ while true
do
case "$1" in
-P)
- opt_patch="$2"
+ opt_patch=$2
shift 2 ;;
-h)
usage -h ;;
@@ -77,33 +77,33 @@ patch=$(find_patch_in_series "$opt_patch") || exit 1
new_patch=${1#$QUILT_PATCHES/}
-if patch_in_series $new_patch || \
+if patch_in_series "$new_patch" || \
[ -d "$QUILT_PC/$new_patch" ] || \
- [ -e "$(patch_file_name $new_patch)" ]
+ [ -e "$(patch_file_name "$new_patch")" ]
then
printf $"Patch %s exists already, please choose a different name\n" \
- "$(print_patch $new_patch)" >&2
+ "$(print_patch "$new_patch")" >&2
exit 1
fi
-if ( is_applied $patch && \
+if ( is_applied "$patch" && \
( ! rename_in_db "$patch" "$new_patch" || \
! move_file "$QUILT_PC/$patch" \
"$QUILT_PC/$new_patch" ) ) || \
! rename_in_series "$patch" "$new_patch" || \
- ( [ -e "$(patch_file_name $patch)" ] && \
- ! move_file "$(patch_file_name $patch)" \
- "$(patch_file_name $new_patch)" )
+ ( [ -e "$(patch_file_name "$patch")" ] && \
+ ! move_file "$(patch_file_name "$patch")" \
+ "$(patch_file_name "$new_patch")" )
then
printf $"Renaming of patch %s to %s failed\n" \
- "$(print_patch $patch)" \
- "$(print_patch $new_patch)" >&2
+ "$(print_patch "$patch")" \
+ "$(print_patch "$new_patch")" >&2
exit 1
fi
printf $"Patch %s renamed to %s\n" \
- "$(print_patch $patch)" \
- "$(print_patch $new_patch)"
+ "$(print_patch "$patch")" \
+ "$(print_patch "$new_patch")"
### Local Variables:
### mode: shell-script