diff options
author | Mikhail Kobuk <m.kobuk@ispras.ru> | 2024-04-06 16:00:01 +0300 |
---|---|---|
committer | Mikhail Kobuk <m.kobuk@ispras.ru> | 2024-04-06 16:00:01 +0300 |
commit | 232c1cb726c809599ce69dbeda7f7f716f106801 (patch) | |
tree | 56d7b3f0222f24086bc968dd7d8ee0a4e59b4b7d /patch.sh | |
download | linux-232c1cb726c809599ce69dbeda7f7f716f106801.tar.gz |
Pre-EUPM build draft
TODO: convert to fakeroot
TODO: separate most modules
TODO: revise config
TODO: adjust logging
TODO: rework patch listing
TODO: update patch selection
Diffstat (limited to 'patch.sh')
-rwxr-xr-x | patch.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/patch.sh b/patch.sh new file mode 100755 index 0000000..fc1a6a3 --- /dev/null +++ b/patch.sh @@ -0,0 +1,19 @@ +#! /bin/bash + +cd $1 + +for pch in ../*.patch; do + printf "Applying patch %s...\n" "$pch" + patch -Np1 < "$pch" | sed 's/^/--> /g' + if [ "$?" == "0" ]; then + printf "[OK] Applying patch %s [OK]\n" "$pch" + else + printf "[ERR!!!] Applying patch %s [ERR!!!]\n" "$pch" + if [ "$2" != "skip" ]; then + echo "assuming error is critical, aborting\n" + exit 1 + fi + fi + + touch ../patch.ok +done |