stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From im...@apache.org
Subject stratos git commit: Fixing script path initialization command in sample application scripts
Date Mon, 02 Feb 2015 18:01:06 GMT
Repository: stratos
Updated Branches:
  refs/heads/master 07862cf31 -> 925aa02f2


Fixing script path initialization command in sample application scripts


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/925aa02f
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/925aa02f
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/925aa02f

Branch: refs/heads/master
Commit: 925aa02f27dd64cb0c19f22e4afc8891188f8079
Parents: 07862cf
Author: Imesh Gunaratne <imesh@apache.org>
Authored: Mon Feb 2 23:30:31 2015 +0530
Committer: Imesh Gunaratne <imesh@apache.org>
Committed: Mon Feb 2 23:30:56 2015 +0530

----------------------------------------------------------------------
 .../complex-app-with-lb/scripts/common/deploy.sh          |  2 +-
 .../complex-app-with-lb/scripts/ec2/deploy.sh             |  4 ++--
 .../complex-app-with-lb/scripts/ec2/undeploy.sh           |  4 ++--
 .../complex-app-with-lb/scripts/kubernetes/deploy.sh      |  2 +-
 .../complex-app-with-lb/scripts/kubernetes/undeploy.sh    |  2 +-
 .../complex-app-with-lb/scripts/mock/deploy.sh            |  4 ++--
 .../complex-app-with-lb/scripts/mock/undeploy.sh          |  4 ++--
 .../complex-app-with-lb/scripts/openstack/deploy.sh       |  4 ++--
 .../complex-app-with-lb/scripts/openstack/undeploy.sh     |  4 ++--
 samples/applications/complex-app/scripts/common/deploy.sh |  2 +-
 samples/applications/complex-app/scripts/ec2/deploy.sh    |  4 ++--
 samples/applications/complex-app/scripts/ec2/undeploy.sh  |  4 ++--
 .../applications/complex-app/scripts/kubernetes/deploy.sh |  2 +-
 .../complex-app/scripts/kubernetes/undeploy.sh            |  2 +-
 samples/applications/complex-app/scripts/mock/deploy.sh   |  4 ++--
 samples/applications/complex-app/scripts/mock/undeploy.sh |  4 ++--
 .../applications/complex-app/scripts/openstack/deploy.sh  |  4 ++--
 .../complex-app/scripts/openstack/undeploy.sh             |  4 ++--
 .../single-cartridge/scripts/common/deploy.sh             |  2 +-
 .../applications/single-cartridge/scripts/ec2/deploy.sh   |  4 ++--
 .../applications/single-cartridge/scripts/ec2/undeploy.sh |  4 ++--
 .../single-cartridge/scripts/kubernetes/deploy.sh         |  2 +-
 .../single-cartridge/scripts/kubernetes/undeploy.sh       |  2 +-
 .../applications/single-cartridge/scripts/mock/deploy.sh  | 10 ++++------
 .../single-cartridge/scripts/mock/undeploy.sh             |  4 ++--
 .../single-cartridge/scripts/openstack/deploy.sh          |  4 ++--
 .../single-cartridge/scripts/openstack/undeploy.sh        |  4 ++--
 27 files changed, 47 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app-with-lb/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/common/deploy.sh b/samples/applications/complex-app-with-lb/scripts/common/deploy.sh
index 710bbd5..a2dfb5c 100755
--- a/samples/applications/complex-app-with-lb/scripts/common/deploy.sh
+++ b/samples/applications/complex-app-with-lb/scripts/common/deploy.sh
@@ -4,7 +4,7 @@ iaas=$1
 host_ip="localhost"
 host_port=9443
 
-script_path="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 artifacts_path="${script_path}/../../artifacts"
 iaas_artifacts_path="${script_path}/../../artifacts/${iaas}"
 cartridges_path="${script_path}/../../../../cartridges/${iaas}"

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app-with-lb/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/ec2/deploy.sh b/samples/applications/complex-app-with-lb/scripts/ec2/deploy.sh
index a4bde8e..62063a2 100755
--- a/samples/applications/complex-app-with-lb/scripts/ec2/deploy.sh
+++ b/samples/applications/complex-app-with-lb/scripts/ec2/deploy.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 
 iaas="ec2"
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash deploy.sh ${iaas}

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app-with-lb/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/ec2/undeploy.sh b/samples/applications/complex-app-with-lb/scripts/ec2/undeploy.sh
index e99acc8..b05cf9f 100644
--- a/samples/applications/complex-app-with-lb/scripts/ec2/undeploy.sh
+++ b/samples/applications/complex-app-with-lb/scripts/ec2/undeploy.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash undeploy.sh

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app-with-lb/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/kubernetes/deploy.sh b/samples/applications/complex-app-with-lb/scripts/kubernetes/deploy.sh
index 4d32769..31909af 100755
--- a/samples/applications/complex-app-with-lb/scripts/kubernetes/deploy.sh
+++ b/samples/applications/complex-app-with-lb/scripts/kubernetes/deploy.sh
@@ -3,7 +3,7 @@
 host_ip="localhost"
 host_port=9443
 iaas="kubernetes"
-script_path="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 common_folder="${script_path}/../common"
 iaas_artifacts_path="${script_path}/../../artifacts/${iaas}"
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app-with-lb/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/kubernetes/undeploy.sh b/samples/applications/complex-app-with-lb/scripts/kubernetes/undeploy.sh
index db39e2a..3dc8e34 100644
--- a/samples/applications/complex-app-with-lb/scripts/kubernetes/undeploy.sh
+++ b/samples/applications/complex-app-with-lb/scripts/kubernetes/undeploy.sh
@@ -2,7 +2,7 @@
 
 host_ip="localhost"
 host_port=9443
-script_path="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 common_folder="${script_path}/../common"
 
 pushd ${common_folder}

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app-with-lb/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/mock/deploy.sh b/samples/applications/complex-app-with-lb/scripts/mock/deploy.sh
index 7db87e2..d9620f9 100755
--- a/samples/applications/complex-app-with-lb/scripts/mock/deploy.sh
+++ b/samples/applications/complex-app-with-lb/scripts/mock/deploy.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 
 iaas="mock"
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash deploy.sh ${iaas}

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app-with-lb/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/mock/undeploy.sh b/samples/applications/complex-app-with-lb/scripts/mock/undeploy.sh
index e99acc8..b05cf9f 100755
--- a/samples/applications/complex-app-with-lb/scripts/mock/undeploy.sh
+++ b/samples/applications/complex-app-with-lb/scripts/mock/undeploy.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash undeploy.sh

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app-with-lb/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/openstack/deploy.sh b/samples/applications/complex-app-with-lb/scripts/openstack/deploy.sh
index caa2aef..1588a45 100755
--- a/samples/applications/complex-app-with-lb/scripts/openstack/deploy.sh
+++ b/samples/applications/complex-app-with-lb/scripts/openstack/deploy.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 
 iaas="openstack"
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash deploy.sh ${iaas}

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app-with-lb/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app-with-lb/scripts/openstack/undeploy.sh b/samples/applications/complex-app-with-lb/scripts/openstack/undeploy.sh
index e99acc8..b05cf9f 100644
--- a/samples/applications/complex-app-with-lb/scripts/openstack/undeploy.sh
+++ b/samples/applications/complex-app-with-lb/scripts/openstack/undeploy.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash undeploy.sh

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/common/deploy.sh b/samples/applications/complex-app/scripts/common/deploy.sh
index 598f8c5..91ce2e2 100755
--- a/samples/applications/complex-app/scripts/common/deploy.sh
+++ b/samples/applications/complex-app/scripts/common/deploy.sh
@@ -4,7 +4,7 @@ iaas=$1
 host_ip="localhost"
 host_port=9443
 
-script_path="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 artifacts_path="${script_path}/../../artifacts"
 iaas_artifacts_path="${script_path}/../../artifacts/${iaas}"
 cartridges_path="${script_path}/../../../../cartridges/${iaas}"

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/ec2/deploy.sh b/samples/applications/complex-app/scripts/ec2/deploy.sh
index a4bde8e..62063a2 100755
--- a/samples/applications/complex-app/scripts/ec2/deploy.sh
+++ b/samples/applications/complex-app/scripts/ec2/deploy.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 
 iaas="ec2"
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash deploy.sh ${iaas}

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/ec2/undeploy.sh b/samples/applications/complex-app/scripts/ec2/undeploy.sh
index e99acc8..b05cf9f 100644
--- a/samples/applications/complex-app/scripts/ec2/undeploy.sh
+++ b/samples/applications/complex-app/scripts/ec2/undeploy.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash undeploy.sh

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/kubernetes/deploy.sh b/samples/applications/complex-app/scripts/kubernetes/deploy.sh
index 4d32769..31909af 100755
--- a/samples/applications/complex-app/scripts/kubernetes/deploy.sh
+++ b/samples/applications/complex-app/scripts/kubernetes/deploy.sh
@@ -3,7 +3,7 @@
 host_ip="localhost"
 host_port=9443
 iaas="kubernetes"
-script_path="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 common_folder="${script_path}/../common"
 iaas_artifacts_path="${script_path}/../../artifacts/${iaas}"
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/kubernetes/undeploy.sh b/samples/applications/complex-app/scripts/kubernetes/undeploy.sh
index db39e2a..3dc8e34 100644
--- a/samples/applications/complex-app/scripts/kubernetes/undeploy.sh
+++ b/samples/applications/complex-app/scripts/kubernetes/undeploy.sh
@@ -2,7 +2,7 @@
 
 host_ip="localhost"
 host_port=9443
-script_path="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 common_folder="${script_path}/../common"
 
 pushd ${common_folder}

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/mock/deploy.sh b/samples/applications/complex-app/scripts/mock/deploy.sh
index 7db87e2..d9620f9 100755
--- a/samples/applications/complex-app/scripts/mock/deploy.sh
+++ b/samples/applications/complex-app/scripts/mock/deploy.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 
 iaas="mock"
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash deploy.sh ${iaas}

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/mock/undeploy.sh b/samples/applications/complex-app/scripts/mock/undeploy.sh
index e99acc8..b05cf9f 100755
--- a/samples/applications/complex-app/scripts/mock/undeploy.sh
+++ b/samples/applications/complex-app/scripts/mock/undeploy.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash undeploy.sh

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/openstack/deploy.sh b/samples/applications/complex-app/scripts/openstack/deploy.sh
index caa2aef..1588a45 100755
--- a/samples/applications/complex-app/scripts/openstack/deploy.sh
+++ b/samples/applications/complex-app/scripts/openstack/deploy.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 
 iaas="openstack"
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash deploy.sh ${iaas}

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/complex-app/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/complex-app/scripts/openstack/undeploy.sh b/samples/applications/complex-app/scripts/openstack/undeploy.sh
index e99acc8..b05cf9f 100644
--- a/samples/applications/complex-app/scripts/openstack/undeploy.sh
+++ b/samples/applications/complex-app/scripts/openstack/undeploy.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash undeploy.sh

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/single-cartridge/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/common/deploy.sh b/samples/applications/single-cartridge/scripts/common/deploy.sh
index 51b844f..e1c12f4 100755
--- a/samples/applications/single-cartridge/scripts/common/deploy.sh
+++ b/samples/applications/single-cartridge/scripts/common/deploy.sh
@@ -4,7 +4,7 @@ iaas=$1
 host_ip="localhost"
 host_port=9443
 
-script_path="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 artifacts_path="${script_path}/../../artifacts"
 iaas_artifacts_path="${script_path}/../../artifacts/${iaas}"
 cartridges_path="${script_path}/../../../../cartridges/${iaas}"

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/single-cartridge/scripts/ec2/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/ec2/deploy.sh b/samples/applications/single-cartridge/scripts/ec2/deploy.sh
index a4bde8e..62063a2 100755
--- a/samples/applications/single-cartridge/scripts/ec2/deploy.sh
+++ b/samples/applications/single-cartridge/scripts/ec2/deploy.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 
 iaas="ec2"
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash deploy.sh ${iaas}

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/single-cartridge/scripts/ec2/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/ec2/undeploy.sh b/samples/applications/single-cartridge/scripts/ec2/undeploy.sh
index e99acc8..b05cf9f 100644
--- a/samples/applications/single-cartridge/scripts/ec2/undeploy.sh
+++ b/samples/applications/single-cartridge/scripts/ec2/undeploy.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash undeploy.sh

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/single-cartridge/scripts/kubernetes/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/kubernetes/deploy.sh b/samples/applications/single-cartridge/scripts/kubernetes/deploy.sh
index 4d32769..31909af 100755
--- a/samples/applications/single-cartridge/scripts/kubernetes/deploy.sh
+++ b/samples/applications/single-cartridge/scripts/kubernetes/deploy.sh
@@ -3,7 +3,7 @@
 host_ip="localhost"
 host_port=9443
 iaas="kubernetes"
-script_path="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 common_folder="${script_path}/../common"
 iaas_artifacts_path="${script_path}/../../artifacts/${iaas}"
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/single-cartridge/scripts/kubernetes/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/kubernetes/undeploy.sh b/samples/applications/single-cartridge/scripts/kubernetes/undeploy.sh
index db39e2a..3dc8e34 100644
--- a/samples/applications/single-cartridge/scripts/kubernetes/undeploy.sh
+++ b/samples/applications/single-cartridge/scripts/kubernetes/undeploy.sh
@@ -2,7 +2,7 @@
 
 host_ip="localhost"
 host_port=9443
-script_path="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 common_folder="${script_path}/../common"
 
 pushd ${common_folder}

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/single-cartridge/scripts/mock/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/mock/deploy.sh b/samples/applications/single-cartridge/scripts/mock/deploy.sh
index 7db87e2..83d22dd 100755
--- a/samples/applications/single-cartridge/scripts/mock/deploy.sh
+++ b/samples/applications/single-cartridge/scripts/mock/deploy.sh
@@ -1,9 +1,7 @@
-#!/bin/bash
+#!/bin/sh
 
 iaas="mock"
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
-pushd ${common_folder}
-bash deploy.sh ${iaas}
-popd
+bash ${common_folder}/deploy.sh ${iaas}

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/single-cartridge/scripts/mock/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/mock/undeploy.sh b/samples/applications/single-cartridge/scripts/mock/undeploy.sh
index e99acc8..b05cf9f 100755
--- a/samples/applications/single-cartridge/scripts/mock/undeploy.sh
+++ b/samples/applications/single-cartridge/scripts/mock/undeploy.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash undeploy.sh

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/single-cartridge/scripts/openstack/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/openstack/deploy.sh b/samples/applications/single-cartridge/scripts/openstack/deploy.sh
index caa2aef..1588a45 100755
--- a/samples/applications/single-cartridge/scripts/openstack/deploy.sh
+++ b/samples/applications/single-cartridge/scripts/openstack/deploy.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 
 iaas="openstack"
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash deploy.sh ${iaas}

http://git-wip-us.apache.org/repos/asf/stratos/blob/925aa02f/samples/applications/single-cartridge/scripts/openstack/undeploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/single-cartridge/scripts/openstack/undeploy.sh b/samples/applications/single-cartridge/scripts/openstack/undeploy.sh
index e99acc8..b05cf9f 100644
--- a/samples/applications/single-cartridge/scripts/openstack/undeploy.sh
+++ b/samples/applications/single-cartridge/scripts/openstack/undeploy.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 
-current_folder="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
-common_folder="${current_folder}/../common"
+script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+common_folder="${script_path}/../common"
 
 pushd ${common_folder}
 bash undeploy.sh


Mime
View raw message