Fix stratos-installer bug - remove hard coded pack filename to setup.conf

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

Branch: refs/heads/master
Commit: f5adccea4164c8e74b314359137205da60e35cd6
Parents: 668a7f7
Author: Akila Perera <[email protected]>
Authored: Thu Sep 25 15:09:42 2014 +0530
Committer: Akila Perera <[email protected]>
Committed: Thu Sep 25 17:12:09 2014 +0530

----------------------------------------------------------------------
 tools/stratos-installer/conf/setup.conf | 3 ++-
 tools/stratos-installer/setup.sh        | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/f5adccea/tools/stratos-installer/conf/setup.conf
----------------------------------------------------------------------
diff --git a/tools/stratos-installer/conf/setup.conf 
b/tools/stratos-installer/conf/setup.conf
index 9522bc2..1fa114b 100644
--- a/tools/stratos-installer/conf/setup.conf
+++ b/tools/stratos-installer/conf/setup.conf
@@ -55,7 +55,8 @@ export mb_ip="127.0.0.1" # Machine ip on which mb run
 export mb_port=61616 #default port which the message broker service runs
  
 export stratos_extract_path=$stratos_path/"apache-stratos"
-export stratos_pack_zip=$stratos_packs/"apache-stratos-4.0.0.zip"
+export stratos_pack_zip_name="apache-stratos-4.1.0-SNAPSHOT.zip"
+export stratos_pack_zip=$stratos_packs/$stratos_pack_zip_name
 
 export activemq_pack=$stratos_packs/"apache-activemq-5.9.1-bin.tar.gz"
 export activemq_path=$stratos_path/"apache-activemq-5.9.1"

http://git-wip-us.apache.org/repos/asf/stratos/blob/f5adccea/tools/stratos-installer/setup.sh
----------------------------------------------------------------------
diff --git a/tools/stratos-installer/setup.sh b/tools/stratos-installer/setup.sh
index 1f8dc1a..f889151 100755
--- a/tools/stratos-installer/setup.sh
+++ b/tools/stratos-installer/setup.sh
@@ -538,7 +538,8 @@ fi
 if [[ !(-d $stratos_extract_path) ]]; then
     echo "Extracting Apache Stratos"
     unzip -q $stratos_pack_zip -d $stratos_path
-    extracted_folder=${stratos_pack_zip%.zip}
+    target=$stratos_path/$stratos_pack_zip_name
+    extracted_folder=${target%.zip}
     mv -f $extracted_folder $stratos_extract_path
 fi
 

Reply via email to