FEATURE: add switch for installing on true - without git@binarity.cz:

This commit is contained in:
Michal Kváček
2016-04-04 23:02:12 +02:00
parent 19ad81a432
commit ae1772652f
+13 -1
View File
@@ -6,9 +6,16 @@ else
INSTALL_DEVEL=0 INSTALL_DEVEL=0
fi fi
if [ "$2" == "local" ]; then
INSTALL_LOCALLY=1
else
INSTALL_LOCALLY=0
fi
# dir with meta informatou about installation # dir with meta informatou about installation
INSTALL_METADATA_DIRECTORY=".install" 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_DOMAIN_FILE=$INSTALL_METADATA_DIRECTORY"/.website_domain"
WEBSITE_PARENT_FILE=$INSTALL_METADATA_DIRECTORY"/.website_parent" WEBSITE_PARENT_FILE=$INSTALL_METADATA_DIRECTORY"/.website_parent"
DB_INITIALIZED_FILE=$INSTALL_METADATA_DIRECTORY"/.db_initialized" DB_INITIALIZED_FILE=$INSTALL_METADATA_DIRECTORY"/.db_initialized"
@@ -74,7 +81,12 @@ fi
# fetch data from server # fetch data from server
if [ ! -n "$(ls -A)" ]; then 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 if [ ! $? -eq 0 ]; then
echo "" echo ""