ALL: Add a suffix argument to do_patch

It allows patching for composed packages
This commit is contained in:
Le Philousophe
2022-01-12 11:43:26 +00:00
parent 33de7675ba
commit 2db89c802a
5 changed files with 10 additions and 14 deletions
+7 -2
View File
@@ -14,8 +14,13 @@ __do_clean_bdir () {
}
__do_patch () {
if [ -d "$PACKAGE_DIR/patches" ]; then
for p in "$PACKAGE_DIR/patches"/*.patch; do
local suffix
if [ -n "$1" ]; then
suffix="-$1"
fi
if [ -d "$PACKAGE_DIR/patches$suffix" ]; then
for p in "$PACKAGE_DIR/patches$suffix"/*.patch; do
echo "Applying $p"
patch -t -p1 < "$p"
done