Update ant script to add +x for onap.sh 99/22699/5
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>
Wed, 8 Nov 2017 06:01:49 +0000 (06:01 +0000)
committersubhash kumar singh <subhash.kumar.singh@huawei.com>
Wed, 8 Nov 2017 10:22:11 +0000 (10:22 +0000)
- Update pom file to add +x permission for onap.sh
- Add script for onap installtion

Change-Id: Ib894dd99c5d81df2b5827454d3c296b43db46c58
Issue-ID: CLI-71
Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
deployment/zip/installer/cli-init.sh [new file with mode: 0644]
deployment/zip/pom.xml

diff --git a/deployment/zip/installer/cli-init.sh b/deployment/zip/installer/cli-init.sh
new file mode 100644 (file)
index 0000000..16d7343
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+export ONAP_CLI_HOME=/opt/onap/cli
+export CLI_PRODUCT_VERSION=onap-1.1
+
+cd $ONAP_CLI_HOME
+
+if [ ! -d ./data ]; then mkdir ./data; fi
+if [ ! -d ./onap-cli-schema ]; then mkdir ./onap-cli-schema; fi
+
+chmod +x ./bin/onap.sh
+
+#Make onap available in path
+ln ./bin/onap.sh /usr/bin/onap
+
+#Print the version
+onap -v
\ No newline at end of file
index f6f9d1b..05d015c 100644 (file)
                                 exclude(name: "**/.gitignore")
                                 }
                                 }
+
+                                ant.copy(todir: "${deployUnzip}") {
+                                fileset(file: "${basedir}/installer/cli-init.sh")
+                                }
+                                ant.chmod(file: "${deployUnzip}/bin/onap.sh", perm: "ugo+x")
+                                ant.chmod(file: "${deployUnzip}/cli-init.sh", perm: "ugo+x")
+
                                 ant.copy(todir:
                                 "${deployUnzip}/lib") {
                                 fileset(file:
                                 }
                                 ant.zip(destfile:
                                 "${deployFolder}/${outfileName}") {
-                                fileset(dir: "${deployUnzip}")
+                                zipfileset(dir: "${deployUnzip}", excludes: "**/*.sh")
+                                zipfileset(dir: "${deployUnzip}", includes: "**/*.sh", filemode: "755")
                                 }
                                 System.out.println("******** completed. ************")
                             </source>