From dea2c0df546d99317dae48a32b58b375a5f77e10 Mon Sep 17 00:00:00 2001 From: Jan Pokorný Date: Thu, 10 Oct 2013 15:55:31 +0200 Subject: patch-fix-offsets: actually I prefer the same indentation case+cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan Pokorný --- patch-fix-offsets | 36 ++++++++++++++++++------------------ 1 file 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 -- cgit