aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/patches_utils.sh
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-08-03 15:05:20 +0200
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-08-06 14:18:35 +0200
commitc31e0667170091488cfdaf1f4b7c576546832e11 (patch)
tree30ba9c4e85c44e32885f8eb85dfa4b0d692e2b23 /scripts/patches_utils.sh
parent0ddae3998e34e24c5877b784332085a81a1ebe7e (diff)
downloadsonarqube-c31e0667170091488cfdaf1f4b7c576546832e11.tar.gz
sonarqube-c31e0667170091488cfdaf1f4b7c576546832e11.zip
[SCRIPTS] add support for patches to start.sh
use seperate start and stop to avoid unpredictable errors when applying patches on a live SQ instance
Diffstat (limited to 'scripts/patches_utils.sh')
-rwxr-xr-xscripts/patches_utils.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/patches_utils.sh b/scripts/patches_utils.sh
new file mode 100755
index 00000000000..7a3dd39e57f
--- /dev/null
+++ b/scripts/patches_utils.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+###############################
+# exposes library functions to modify properties in a property
+###############################
+
+set -euo pipefail
+
+PATCHES_HOME=scripts/patches
+
+# $1: name(s) of patches to call, separated by a colon
+# all other arguments are passed as is to the patches
+function call_patches() {
+ PATCHES=$1
+ ARGS=${@:2}
+
+ IFS=','
+ for PATCH in $PATCHES; do
+ #echo "calling $PATCHES_HOME/$PATCH.sh $ARGS"
+ $PATCHES_HOME/$PATCH.sh $ARGS
+ done
+}
+
+