summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2012-12-05 14:53:15 +0100
committerJean Delvare <jdelvare@suse.de>2012-12-05 14:53:15 +0100
commit6c783be0682917b393ce72c51e75eee3b043d954 (patch)
tree4879838bb8f3ba67b965345b480aec136eea2da2
parentb6694892ab6b9b963e6bddf93c2d9c2474333b49 (diff)
downloadquilt-6c783be0682917b393ce72c51e75eee3b043d954.tar.gz
refresh: Fix parameter quoting
-rw-r--r--quilt.changes1
-rw-r--r--quilt/refresh.in40
2 files changed, 21 insertions, 20 deletions
diff --git a/quilt.changes b/quilt.changes
index 0622086..ccf7bbd 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -4,6 +4,7 @@ Wed Dec 5 14:44:13 CET 2012 - jdelvare@suse.de
- top: Fix parameter quoting.
- rename: Fix parameter quoting.
- diff: Fix parameter quoting.
+- refresh: Fix parameter quoting.
-------------------------------------------------------------------
Wed Dec 5 14:43:58 CET 2012 - jdelvare@suse.de
diff --git a/quilt/refresh.in b/quilt/refresh.in
index 1b9071b..5245eeb 100644
--- a/quilt/refresh.in
+++ b/quilt/refresh.in
@@ -182,14 +182,14 @@ if [ -n "$opt_fork" ]; then
patch=$(next_filename "$patch")
fi
if [ -e "$(patch_file_name "$patch")" ]; then
- printf $"Patch %s exists already\n" "$(print_patch $patch)" >&2
+ printf $"Patch %s exists already\n" "$(print_patch "$patch")" >&2
exit 1
fi
fi
if [ -z "$opt_strip_level" ]
then
- opt_strip_level=$(patch_strip_level $patch)
+ opt_strip_level=$(patch_strip_level "$patch")
fi
case "$opt_strip_level" in
0 | 1)
@@ -237,7 +237,7 @@ do
if [ -n "$files_were_shadowed" -a -z "$opt_force" ]
then
- printf $"More recent patches modify files in patch %s. Enforce refresh with -f.\n" "$(print_patch $patch)" >&2
+ printf $"More recent patches modify files in patch %s. Enforce refresh with -f.\n" "$(print_patch "$patch")" >&2
die 1
fi
@@ -249,7 +249,7 @@ done >> $tmp_patch
if ! [ -s $tmp_patch ]
then
- printf $"Nothing in patch %s\n" "$(print_patch $patch)" >&2
+ printf $"Nothing in patch %s\n" "$(print_patch "$patch")" >&2
die 1
fi
@@ -269,7 +269,7 @@ else
fi
# FIXME: no stripping of non-topmost patch !!!
-patch_file=$(patch_file_name $patch)
+patch_file=$(patch_file_name "$patch")
trap "" SIGINT
@@ -316,22 +316,22 @@ fi
cat $tmp_patch >> $tmp_result
-mkdir -p $(dirname $patch_file)
+mkdir -p $(dirname "$patch_file")
-if [ -e $patch_file ] && \
- diff -q $patch_file $tmp_result > /dev/null
+if [ -e "$patch_file" ] && \
+ diff -q "$patch_file" $tmp_result > /dev/null
then
- printf $"Patch %s is unchanged\n" "$(print_patch $patch)"
-elif ( [ -z "$QUILT_BACKUP" -o ! -e $patch_file ] || \
- mv $patch_file $patch_file~ ) && \
- cat_to_new_file $patch_file < $tmp_result
+ printf $"Patch %s is unchanged\n" "$(print_patch "$patch")"
+elif ( [ -z "$QUILT_BACKUP" -o ! -e "$patch_file" ] || \
+ mv "$patch_file" "$patch_file~" ) && \
+ cat_to_new_file "$patch_file" < $tmp_result
then
if [ -n "$opt_fork" ]
then
if ! insert_in_series "$patch" "$old_patch_args"
then
printf $"Failed to insert patch %s into file series\n" \
- "$(print_patch $patch)" >&2
+ "$(print_patch "$patch")" >&2
rm -f "$patch_file"
exit 1
fi
@@ -340,22 +340,22 @@ then
! echo "$patch" >> $QUILT_PC/applied-patches
then
printf $"Failed to create patch %s\n" \
- "$(print_patch $patch)" >&2
+ "$(print_patch "$patch")" >&2
exit 1
fi
printf $"Fork of patch %s created as %s\n" \
- "$(print_patch $old_patch)" \
- "$(print_patch $patch)"
+ "$(print_patch "$old_patch")" \
+ "$(print_patch "$patch")"
else
- printf $"Refreshed patch %s\n" "$(print_patch $patch)"
+ printf $"Refreshed patch %s\n" "$(print_patch "$patch")"
fi
- touch $QUILT_PC/$patch/.timestamp
+ touch "$QUILT_PC/$patch/.timestamp"
else
die 1
fi
-rm -f $QUILT_PC/$patch~refresh
-if ! change_db_strip_level -p$num_strip_level $patch
+rm -f "$QUILT_PC/$patch~refresh"
+if ! change_db_strip_level -p$num_strip_level "$patch"
then
die 1
fi