[omd-commits] OMD Git: omd: nagvis: Improved script for easier version update

git version control git at mathias-kettner.de
Fri Dec 23 17:58:20 CET 2011


Module:   omd
Branch:   master
Commit:   c37ab71271b3d0470b62245f43de8a0e6099ae4b
URL:      http://omdistro.org/projects/omd/repository/revisions/c37ab71271b3d0470b62245f43de8a0e6099ae4b

Author:   Lars Michelsen <lm at mathias-kettner.de>
Date:     Fri Dec 23 17:52:42 2011 +0100
Commiter: Lars Michelsen <lm at mathias-kettner.de>
Date:     Fri Dec 23 17:52:42 2011 +0100

nagvis: Improved script for easier version update

---

 packages/nagvis/Makefile      |    1 -
 packages/nagvis/update-nagvis |   14 +++++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/packages/nagvis/Makefile b/packages/nagvis/Makefile
index ae745d7..6528b5d 100644
--- a/packages/nagvis/Makefile
+++ b/packages/nagvis/Makefile
@@ -2,7 +2,6 @@ include ../../Makefile.omd
 
 NAME = nagvis
 VERSION = 1.6.2
-#VERSION = 1.6-nightly
 DIR = $(NAME)-$(VERSION)
 
 .PHONY: skel
diff --git a/packages/nagvis/update-nagvis b/packages/nagvis/update-nagvis
index bcaded2..1be07d8 100755
--- a/packages/nagvis/update-nagvis
+++ b/packages/nagvis/update-nagvis
@@ -1,2 +1,14 @@
 #!/bin/bash
-wget -O nagvis-1.6-nightly.tar.gz http://nagvis.org/share/nagvis-1.6-nightly.tar.gz
+if [ "$1" = "nightly" ]; then
+    VERSION=1.6-nightly
+    echo "Adding current nightly build..."
+    wget -O nagvis-$VERSION.tar.gz http://nagvis.org/share/nagvis-$VERSION.tar.gz
+else
+    VERSION=$(wget -O - http://nagvis.org/stable_release.php 2>/dev/null)
+    [ -z "$VERSION" ] && echo "ERROR: Got no version." && exit 1
+    echo "Adding current VERSION ($VERSION)..."
+    wget -O nagvis-$VERSION.tar.gz https://sourceforge.net/projects/nagvis/files/NagVis%20${VERSION%.*}/nagvis-$VERSION.tar.gz/download 2>/dev/null
+fi
+
+sed -i "s/^VERSION = .*$/VERSION = $VERSION/g" Makefile
+exit 0



More information about the omd-commits mailing list