summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsmael Luceno2021-12-31 00:38:22 +0100
committerIsmael Luceno2021-12-31 00:57:07 +0100
commit538b837633934014ad12847e62c20ba2fbab05a8 (patch)
tree00bf975711e0bee061b1f19b39c5e23d4edec522
parent521e9e563cf1781051aebfb289b1a4efd15f17cc (diff)
FUNCTIONS: Add apply_patch_dir
-rwxr-xr-xFUNCTIONS9
1 files changed, 9 insertions, 0 deletions
diff --git a/FUNCTIONS b/FUNCTIONS
index 8d7d2bcc..97c8ecd5 100755
--- a/FUNCTIONS
+++ b/FUNCTIONS
@@ -5,6 +5,15 @@ QT4DIR=$INSTALL_ROOT/opt/qt4
QT5DIR=$INSTALL_ROOT/opt/qt5
#---------------------------------------------------------------------
+## Apply patches from a directory
+#---------------------------------------------------------------------
+function apply_patch_dir() {
+ [ -d "$SPELL_DIRECTORY/$1" ] || return 0
+ find "$SPELL_DIRECTORY/$1" \( -name \*.patch -o -name \*.diff \) -print0 |
+ sort -zV | xargs -0 -n 1 -t patch -fp1 -i
+}
+
+#---------------------------------------------------------------------
## Replaces sorcerys default_pre_build with a custom version using
## the invoke_gcc function from libgcc
#---------------------------------------------------------------------