fixed build with bundled OpenSSL
[public/netxms.git] / tools / create_apkg.sh
1 #!/bin/sh
2
3 version=$1
4 if [ -z "$version" ]; then
5 echo "Usage: tools/create_apkg.sh <version>"
6 exit 1
7 fi
8
9 if [ ! -r netxms-$version.tar.gz ]; then
10 echo "Unable to find distribution package netxms-$version.tar.gz"
11 exit 1
12 fi
13
14 cd contrib
15 if [ $? != 0 ]; then
16 echo "Cannot change directory to contrib. Do you run script from source tree root?"
17 exit 1
18 fi
19
20 rm -rf inst &&
21 mkdir inst &&
22 cp ../netxms-$version.tar.gz inst/ &&
23 cp installAgent.sh inst/ &&
24 tar zcvf inst.tar.gz inst &&
25 mv inst.tar.gz ../tools/ &&
26 cd ../tools/ &&
27 bash ./sharIt inst.tar.gz inst/installAgent.sh ../nxagent-$version.apkg &&
28 cd .. &&
29 rm -rf contrib/inst