summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2013-10-14 20:13:34 +0200
committerJan Pokorný <jpokorny@redhat.com>2013-10-14 20:13:34 +0200
commit271ecad6e9bdb7ff3d7dd7e00a3750d22581f1eb (patch)
treeccfc568e10b650e6e41756e604f064212429f76b
parent9d0ff148e3670d8880d6292cff2a0a41fdadcd58 (diff)
downloadpatch-fix-offsets-271ecad6e9bdb7ff3d7dd7e00a3750d22581f1eb.zip
patch-fix-offsets-271ecad6e9bdb7ff3d7dd7e00a3750d22581f1eb.tar.gz
patch-fix-offsets-271ecad6e9bdb7ff3d7dd7e00a3750d22581f1eb.tar.xz
Pseudo-handle the "can't find file to patch at input line X" errorHEADmaster
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rwxr-xr-xpatch-fix-offsets4
1 files changed, 4 insertions, 0 deletions
diff --git a/patch-fix-offsets b/patch-fix-offsets
index bd453b0..f1cc0be 100755
--- a/patch-fix-offsets
+++ b/patch-fix-offsets
@@ -30,6 +30,10 @@ patch_figure_expr() {
perfile_expr=${perfile_expr:+${perfile_expr}:}
perfile_expr+="${hunk}/${offset}"
;;
+ can\'t\ find\ file\ to\ patch\ at\ input\ line\ *)
+ echo "Forgot to specify -p option?"
+ exit 1
+ ;;
esac
done < <(patch -o- "$@" 2>&1 >/dev/null; echo '@@EOF@@')
echo "${final_expr}"