From ae1772652fb8cb35de52855409200d06073d249d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Mon, 4 Apr 2016 23:02:12 +0200 Subject: [PATCH] FEATURE: add switch for installing on true - without git@binarity.cz: --- scripts/install.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index b50144ee..5ccdb8de 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -6,9 +6,16 @@ else INSTALL_DEVEL=0 fi +if [ "$2" == "local" ]; then + INSTALL_LOCALLY=1 +else + INSTALL_LOCALLY=0 +fi + # dir with meta informatou about installation INSTALL_METADATA_DIRECTORY=".install" +# if possible, do not change these paths - otherwise update could broke down WEBSITE_DOMAIN_FILE=$INSTALL_METADATA_DIRECTORY"/.website_domain" WEBSITE_PARENT_FILE=$INSTALL_METADATA_DIRECTORY"/.website_parent" DB_INITIALIZED_FILE=$INSTALL_METADATA_DIRECTORY"/.db_initialized" @@ -74,7 +81,12 @@ fi # fetch data from server if [ ! -n "$(ls -A)" ]; then - git clone git@binarity.cz:/opt/git/internal/cms/minicms.git -b $WEBSITE_PARENT . + + if [ $INSTALL_LOCALLY -eq 0 ]; then + git clone git@binarity.cz:/opt/git/internal/cms/minicms.git -b $WEBSITE_PARENT . + else + git clone /opt/git/internal/cms/minicms.git -b $WEBSITE_PARENT . + fi if [ ! $? -eq 0 ]; then echo ""