summaryrefslogtreecommitdiff
path: root/development/nexus/doinst.sh
diff options
context:
space:
mode:
authorGiorgio Peron <giorgio.peron@gmail.com>2011-07-30 12:45:04 -0300
committerNiels Horn <niels.horn@slackbuilds.org>2011-07-30 12:45:04 -0300
commitce43fa264282d4937ce0baacfc14a7e4471da9cc (patch)
tree8bffbdc7ca11ba6f5fbab5c53fa0fe8ef42b5c1a /development/nexus/doinst.sh
parent215bce3ec1483736120fece2a7dda1dc0ee43008 (diff)
downloadslackbuilds-ce43fa264282d4937ce0baacfc14a7e4471da9cc.tar.gz
development/nexus: Added (Maven repository manager)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'development/nexus/doinst.sh')
-rw-r--r--development/nexus/doinst.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/development/nexus/doinst.sh b/development/nexus/doinst.sh
new file mode 100644
index 0000000000..2b7b1560a0
--- /dev/null
+++ b/development/nexus/doinst.sh
@@ -0,0 +1,27 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+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.nexus.new
+config etc/nexus/plexus.properties.new
+config etc/nexus/wrapper.conf.new