From bf35dc644b93a58e8e36937d784832b44536010c Mon Sep 17 00:00:00 2001 From: j3nsch Date: Wed, 30 Sep 2015 16:29:33 +0200 Subject: [PATCH 001/115] OPUSVIER-3527 - Changed paths in install script and added user query for base url. --- bin/install.sh | 72 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 21 deletions(-) diff --git a/bin/install.sh b/bin/install.sh index df67642c5..15d58b78a 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -20,14 +20,16 @@ set -e # START USER-CONFIGURATION -BASEDIR='/var/local/opus4' SOLR_SERVER_URL='http://archive.apache.org/dist/lucene/solr/5.2.1/solr-5.2.1.tgz' +MYSQL_CLIENT='/usr/bin/mysql' + # END OF USER-CONFIGURATION SCRIPT_NAME="`basename "$0"`" SCRIPT_NAME_FULL="`readlink -f "$0"`" SCRIPT_PATH="`dirname "$SCRIPT_NAME_FULL"`" +BASEDIR="`dirname "$SCRIPT_PATH"`" # check input parameter if [ $# -lt 1 ] @@ -46,30 +48,34 @@ else exit 1 fi -MYSQL_CLIENT='/usr/bin/mysql' +cd "$BASEDIR" -# including installer components -if [ -f "$SCRIPT_PATH/installer.includes" ]; then - . "$SCRIPT_PATH/installer.includes" -fi +# Install dependencies +# -------------------- -cd "$BASEDIR" +"$SCRIPT_PATH/install-composer.sh" "$BASEDIR" +# Create .htaccess file +# --------------------- -# install dependencies -"$SCRIPT_PATH/install-composer.sh" "$BASEDIR/opus4" +[[ -z $OPUS_URL_BASE ]] && read -p "Base URL for OPUS [opus4]: " OPUS_URL_BASE +OPUS_URL_BASE="/${OPUS_URL_BASE:-opus4}" +OPUS_URL_BASE_ESC=`echo "$OPUS_URL_BASE" | sed 's/\!/\\\!/g'` -# create .htaccess -[[ -z $OPUS_URL_BASE ]] && OPUS_URL_BASE='/opus4' -sed -e "s!