summaryrefslogtreecommitdiff
path: root/development/sonarqube/doinst.sh
diff options
context:
space:
mode:
authorGiorgio Peron <giorgio.peron@gmail.com>2014-07-28 07:54:02 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-07-28 07:54:02 +0700
commit799321b4358c10f5a193f2ee9b041f0cdd43475d (patch)
tree8f674fcb5ca9e563168c4281dd620d3fe7bff9b4 /development/sonarqube/doinst.sh
parent4102f794497fed7480e3b0a3783ffc0dc1bd55e5 (diff)
downloadslackbuilds-799321b4358c10f5a193f2ee9b041f0cdd43475d.tar.gz
development/sonarqube: Added (quality management platform).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/sonarqube/doinst.sh')
-rw-r--r--development/sonarqube/doinst.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/development/sonarqube/doinst.sh b/development/sonarqube/doinst.sh
new file mode 100644
index 0000000000..999f782e38
--- /dev/null
+++ b/development/sonarqube/doinst.sh
@@ -0,0 +1,24 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.sonarqube.new
+config usr/share/sonarqube/conf/sonar.properties.new
+config usr/share/sonarqube/conf/wrapper.conf.new