summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpatch-fix-offsets36
1 files changed, 18 insertions, 18 deletions
diff --git a/patch-fix-offsets b/patch-fix-offsets
index b7ef3cb..d05f460 100755
--- a/patch-fix-offsets
+++ b/patch-fix-offsets
@@ -14,22 +14,22 @@ patch_figure_expr() {
while read line; do
#echo "${line}"
case "${line}" in
- patching\ file\ *|@@EOF@@)
- if test -n "$perfile_expr"; then
- final_expr=${final_expr:+${final_expr}::}
- final_expr+="${file}:${perfile_expr}"
- fi
- file=${line#patching file }
- perfile_expr=
- ;;
- Hunk\ \#*\ succeeded\ at\ *\ \(offset\ *\ lines\).)
- hunk=${line#Hunk #}
- hunk=${hunk%% *}
- offset=${line#* (offset }
- offset=${offset% *}
- perfile_expr=${perfile_expr:+${perfile_expr}:}
- perfile_expr+="${hunk}/${offset}"
- ;;
+ patching\ file\ *|@@EOF@@)
+ if test -n "$perfile_expr"; then
+ final_expr=${final_expr:+${final_expr}::}
+ final_expr+="${file}:${perfile_expr}"
+ fi
+ file=${line#patching file }
+ perfile_expr=
+ ;;
+ Hunk\ \#*\ succeeded\ at\ *\ \(offset\ *\ lines\).)
+ hunk=${line#Hunk #}
+ hunk=${hunk%% *}
+ offset=${line#* (offset }
+ offset=${offset% *}
+ perfile_expr=${perfile_expr:+${perfile_expr}:}
+ perfile_expr+="${hunk}/${offset}"
+ ;;
esac
done < <(patch -o- "$@" 2>&1 >/dev/null; echo '@@EOF@@')
echo "${final_expr}"
@@ -43,8 +43,8 @@ while test ${cnt} -le $#; do
i="${@:${cnt}:1}"
echo "${i}"
case "${i}" in
- -*|--*) args+=" ${i}";;
- *) patches+=" ${i}";;
+ -*|--*) args+=" ${i}";;
+ *) patches+=" ${i}";;
esac
let cnt+=1
done