16 lines
453 B
Bash
16 lines
453 B
Bash
#!/usr/bin/env bash
|
|
|
|
rlte_print() { printf '\033[34m[%s] %s\033[0m\n' "$0" "$*" ; }
|
|
rlte_error() { printf '\033[31m[%s] error: %s\033[0m\n' "$0" "$*" >&2 ; exit 1; }
|
|
rlte_ok() { printf '\033[32m[%s] ok: %s\033[0m\n' "$0" "$*" ; exit 0; }
|
|
|
|
apply_patches() {
|
|
local dir="$1"
|
|
for p in "$dir"/*.patch; do
|
|
[ -e "$p" ] || continue
|
|
patch -p1 --forward --batch --dry-run < "$p" || continue
|
|
patch -p1 --batch < "$p"
|
|
done
|
|
}
|
|
|