From 8e0a618f12fb1f292bf28d2ca2ae283e5549111d Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Mon, 11 Nov 2013 12:21:50 +0000
Subject: [PATCH] SP-1005, SWE-22: install-servers.sh: Extract tar ball name
 because wildcards are not working.

SVN: 30128
---
 openbis_all/source/bash/install-servers.sh | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/openbis_all/source/bash/install-servers.sh b/openbis_all/source/bash/install-servers.sh
index fdc32a05ee4..55201a8f14c 100755
--- a/openbis_all/source/bash/install-servers.sh
+++ b/openbis_all/source/bash/install-servers.sh
@@ -29,10 +29,12 @@ rm -rf "$OPENBIS_ROOT_DIR/"openBIS-installation*tar.gz
 "$BIN_DIR/fetch-ci-artifacts.sh" -d "$OPENBIS_ROOT_DIR" gradle-installation
 
 echo "==== Unpack installation tar ball and replace console.properties"
-tar xzf "$OPENBIS_ROOT_DIR/"openBIS-installation*tar.gz -C "$OPENBIS_ROOT_DIR"
-rm -rf "$OPENBIS_ROOT_DIR/"openBIS-installation*tar.gz
-rm -f "$OPENBIS_ROOT_DIR/"openBis-installation*/console.properties
-cp "$OPENBIS_ROOT_DIR/console.properties" "$OPENBIS_ROOT_DIR/"openBis-installation*/
+TARBALL=`ls -1 $OPENBIS_ROOT_DIR/openBIS-installation*.tar.gz`
+tar xzf "$TARBALL" -C "$OPENBIS_ROOT_DIR"
+rm -rf "$TARBALL"
+INSTALLER_DIR=${TARBALL%.tar.gz}
+rm -f "$INSTALLER_DIR/console.properties"
+cp "$OPENBIS_ROOT_DIR/console.properties" "$INSTALLER_DIR/"
 
 echo "==== Upgrade installation"
-"$OPENBIS_ROOT_DIR/"openBis-installation*/run-console.sh
+"$INSTALLER_DIR/run-console.sh"
-- 
GitLab