#!/bin/bash #------------------------------------------------------------------ # Copyright (c) 2006-2011 Gluster, Inc. # This file is part of Gluster Management Gateway. # # Gluster Management Gateway is free software; you can redistribute # it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation; either # version 3 of the License, or (at your option) any later version. # # Gluster Management Gateway is distributed in the hope that it # will be useful, but WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see # . #------------------------------------------------------------------ WAR_NAME="glustermg.war" WAR_SCRIPTS_DIR=${WAR_NAME}/scripts NEW_WAR_NAME="glustermg" VERSION=${VERSION:-1.0.0alpha} TAR_NAME=${NEW_WAR_NAME}-${VERSION}.war.tar INSTALL_SCRIPT_NAME=gmg-install.sh INSTALLER_TAR_NAME=gmg-installer-${VERSION}.tar prepare-dist-dir() { if [ -d ${WAR_NAME} ]; then rm -rf ${WAR_NAME} fi mkdir -p ${WAR_SCRIPTS_DIR} if [ -d ${NEW_WAR_NAME} ]; then rm -rf ${NEW_WAR_NAME} fi } get-server-war() { cd ${WAR_NAME} WAR_FILE=`find -L ${SERVER_DIST_DIR} -name ${WAR_NAME}` jar xvf ${WAR_FILE} # Update version number in Utils.py sed -i "s/@VERSION@/${VERSION}/g" scripts/Utils.py chmod +x scripts/* cd - } # On some platforms like Mac and Windows 7, the entries for other architectures are causing problem # e.g. The "x86" entries cause errors in a 64 bit Mac client. Hence we remove the unnecessary entries # from the JNLP files i.e. Remove all "x86_64" related tags from the JNLP file of "x86" architecture, # and vice versa update-jnlp() { CPU_ARCH=${1} JNLP_FILE=${2} if [ "${CPU_ARCH}" == "x86" ]; then TAG_START_EXPR="