diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2013-10-10 15:55:31 +0200 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2013-10-10 15:56:36 +0200 |
commit | dea2c0df546d99317dae48a32b58b375a5f77e10 (patch) | |
tree | 774bb500b635094d38b2b3fbba6bd907a3b645c6 | |
parent | 8ac6fd870d1339102155da6e75c1af9ed609dcb0 (diff) | |
download | patch-fix-offsets-dea2c0df546d99317dae48a32b58b375a5f77e10.tar.gz patch-fix-offsets-dea2c0df546d99317dae48a32b58b375a5f77e10.tar.xz patch-fix-offsets-dea2c0df546d99317dae48a32b58b375a5f77e10.zip |
patch-fix-offsets: actually I prefer the same indentation case+cases
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rwxr-xr-x | patch-fix-offsets | 36 |
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 |