diff options
author | kitsunyan | 2018-05-05 12:52:23 +0000 |
---|---|---|
committer | kitsunyan | 2018-05-05 12:52:23 +0000 |
commit | 4b07b34b80ecbf8cfb88945a56ce021525b74741 (patch) | |
tree | 6b05af865055e3a3278c3be2511aaec43d7949e9 /completion/make.sh | |
parent | dbe10af0544069641f48cee263717eff68dee07e (diff) |
Add patches for pacman completions from git
Diffstat (limited to 'completion/make.sh')
-rwxr-xr-x | completion/make.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/completion/make.sh b/completion/make.sh index 323dad6..b8f0d47 100755 --- a/completion/make.sh +++ b/completion/make.sh @@ -10,6 +10,14 @@ function error() { } function apply-patch() { + for f in "$@"; do + patch -sNp1 --dry-run -i "$f" > /dev/null && { + patch -sNp1 -r - --no-backup-if-mismatch -i "$f" + return "$?" + } + done + + # show error applying first patch patch -sNp1 -r - --no-backup-if-mismatch -i "$1" } @@ -30,7 +38,7 @@ function delete-shell-array() { > 'bash' || error 'bash' - apply-patch 'bash.patch' || + apply-patch 'bash.patch' 'bash-git.patch' || error 'bash' exit 0 @@ -51,7 +59,7 @@ function delete-shell-array() { > 'zsh' || error 'zsh' - apply-patch 'zsh.patch' || + apply-patch 'zsh.patch' 'zsh-git.patch' || error 'zsh' exit 0 |