Added script for .apkg files creation
authorVictor Kirhenshtein <victor@netxms.org>
Thu, 7 Jun 2007 16:09:40 +0000 (16:09 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Thu, 7 Jun 2007 16:09:40 +0000 (16:09 +0000)
.gitattributes
tools/Makefile.am
tools/create_apkg.sh [new file with mode: 0755]
tools/sharIt

index 35c11ba..4f1d973 100644 (file)
@@ -1543,6 +1543,7 @@ src/server/tools/nxupload/nxupload.cpp -text
 src/server/tools/nxupload/nxupload.dsp -text
 src/server/tools/nxupload/nxupload.dsw -text
 tools/Makefile.am -text
+tools/create_apkg.sh -text
 tools/create_ssa_list.sh -text
 tools/mc.pl -text
 tools/nwmkimp.pl -text
index 70fb47f..0fcfc06 100644 (file)
@@ -8,4 +8,4 @@
 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
-EXTRA_DIST = nwmkimp.pl mc.pl patch_libtool.pl create_ssa_list.sh
+EXTRA_DIST = nwmkimp.pl mc.pl patch_libtool.pl create_ssa_list.sh create_apkg.sh
diff --git a/tools/create_apkg.sh b/tools/create_apkg.sh
new file mode 100755 (executable)
index 0000000..29fd3a6
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+version=$1
+if [ "x$version" == "x" ]; then
+       echo "Usage: tools/create_apkg.sh <version>"
+       exit 1
+fi
+
+if [ ! \( -a netxms-$version.tar.gz \) ]; then
+       echo "Unable to find distribution package netxms-$version.tar.gz"
+       exit 1
+fi
+
+cd contrib
+if [ $? != 0 ]; then
+       echo "Cannot change directory to contrib. Do you run script from source tree root?"
+       exit 1
+fi
+
+rm -rf inst
+mkdir inst
+cp ../netxms-$version.tar.gz inst/
+cp installAgent.sh inst
+tar zcvf inst.tar.gz inst
+mv inst.tar.gz ../tools/
+cd ../tools/
+bash ./sharIt inst.tar.gz inst/installAgent.sh ../nxagent-$version.apkg
+cd ..
+rm -rf contrib/inst
index 2f380e0..4eb044f 100755 (executable)
@@ -36,7 +36,7 @@ if [ $? != 0 ]; then
        fi
 fi
 
-skip=`echo \`wc -l stub.sh|cut -b1-8\``
+skip=`echo \`wc -l stub.sh|cut -d " " -f 1\``
 
 if [ "x$BASH" == "x" ]; then
        skip1=`let $skip+1`