diff options
author | Ismael Luceno | 2019-09-17 19:47:53 +0200 |
---|---|---|
committer | Ismael Luceno | 2019-09-17 20:57:50 +0200 |
commit | 2f47c3b90ed2b2a1f34826bc625084d06f50e5f7 (patch) | |
tree | 03d5f4ea678de24cf866da3f2d2cc01b6dd14b8c /shell-term-fm | |
parent | 768a433f71991bfcc3ee7e8ecba3572a801068c0 (diff) |
st: Improve patch handling
Diffstat (limited to 'shell-term-fm')
-rw-r--r-- | shell-term-fm/st/HISTORY | 1 | ||||
-rwxr-xr-x | shell-term-fm/st/PRE_BUILD | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/shell-term-fm/st/HISTORY b/shell-term-fm/st/HISTORY index ec4ebd1fce..17347ccc8b 100644 --- a/shell-term-fm/st/HISTORY +++ b/shell-term-fm/st/HISTORY @@ -1,6 +1,7 @@ 2019-09-17 Ismael Luceno <ismael@sourcemage.org> * DETAILS: updated spell to 0.8.2 * INSTALL, PRE_BUILD: Avoid editing config.mk + * PRE_BUILD: Improved patch handling 2018-04-17 Pavel Vinogradov <public@sourcemage.org> * DETAILS: version 0.8.1, http -> https diff --git a/shell-term-fm/st/PRE_BUILD b/shell-term-fm/st/PRE_BUILD index 6298076b9d..b9b7235c19 100755 --- a/shell-term-fm/st/PRE_BUILD +++ b/shell-term-fm/st/PRE_BUILD @@ -2,9 +2,9 @@ default_pre_build && cd ${SOURCE_DIRECTORY} && for i in "$SPELL_DIRECTORY"/patches/*; do - desc="$(sed -nr '/^Subject: /!d;s@[^ ]* *(\[[A-Za-z0-9 ]*\] *)*@@;p;q' "$i")" && - if query "Apply ${i##*/} ($desc)?" n; then - patch -sp1 -i "$i" + desc="$(sed -r '/^Subject: /!d;s@[^ ]* *(\[[^\]]*\] *)*@ (@;s@$@)@;q' "$i")" && + if query "Apply ${i##*/}$desc?" n; then + patch -sp1 -i "$i" || break fi done && |