mirror of
https://bitbucket.org/seefoe/swg-main.git
synced 2026-01-15 22:04:19 -05:00
Added config support for build script
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,5 +7,6 @@ dsrc/*
|
||||
site/*
|
||||
stationapi/build/*
|
||||
.setup
|
||||
config.sh
|
||||
checksums_*.txt
|
||||
patch_*.rsp
|
||||
|
||||
43
build.sh
43
build.sh
@@ -2,14 +2,6 @@
|
||||
|
||||
basedir=$PWD
|
||||
PATH=$PATH:$basedir/build/bin
|
||||
DBSERVICE=
|
||||
DBUSERNAME=
|
||||
DBPASSWORD=
|
||||
HOSTIP=
|
||||
CLUSTERNAME=
|
||||
NODEID=
|
||||
DSRC_DIR=
|
||||
DATA_DIR=
|
||||
GIT_URL="https://bitbucket.org/seefoe/"
|
||||
GIT_REPO_SRC=${GIT_URL}src.git
|
||||
GIT_REPO_DSRC=${GIT_URL}dsrc.git
|
||||
@@ -18,6 +10,11 @@ GIT_REPO_DATA=${GIT_URL}data.git
|
||||
GIT_REPO_CLIENTDATA=${GIT_URL}clientdata.git
|
||||
GIT_REPO_SITE=${GIT_URL}swg-site.git
|
||||
|
||||
# load config for build script
|
||||
if [ -e "config.sh" ]; then
|
||||
source config.sh
|
||||
else
|
||||
|
||||
# Debug and Release are for testing and not public servers, they lack optimizations
|
||||
MODE=Release
|
||||
#MODE=Debug
|
||||
@@ -120,20 +117,30 @@ read -p "Do you want to build the config environment now? (y/n) " response
|
||||
response=${response,,} # tolower
|
||||
if [[ $response =~ ^(yes|y| ) ]]; then
|
||||
|
||||
echo "Enter your IP address (LAN for port forwarding or internal, outside IP for DMZ)"
|
||||
read HOSTIP
|
||||
if [[ -z "$HOSTIP" ]]; then
|
||||
echo "Enter your IP address (LAN for port forwarding or internal, outside IP for DMZ)"
|
||||
read HOSTIP
|
||||
fi
|
||||
|
||||
echo "Enter the DSN for the database connection "
|
||||
read DBSERVICE
|
||||
if [[ -z "$DBSERVICE" ]]; then
|
||||
echo "Enter the DSN for the database connection "
|
||||
read DBSERVICE
|
||||
fi
|
||||
|
||||
echo "Enter the database username "
|
||||
read DBUSERNAME
|
||||
if [[ -z "$DBUSERNAME" ]]; then
|
||||
echo "Enter the database username "
|
||||
read DBUSERNAME
|
||||
fi
|
||||
|
||||
echo "Enter the database password "
|
||||
read DBPASSWORD
|
||||
if [[ -z "$DBPASSWORD" ]]; then
|
||||
echo "Enter the database password "
|
||||
read DBPASSWORD
|
||||
fi
|
||||
|
||||
echo "Enter a name for the galaxy cluster "
|
||||
read CLUSTERNAME
|
||||
if [[ -z "$CLUSTERNAME" ]]; then
|
||||
echo "Enter a name for the galaxy cluster "
|
||||
read CLUSTERNAME
|
||||
fi
|
||||
|
||||
if [ -d $basedir/exe ]; then
|
||||
rm -rf $basedir/exe
|
||||
|
||||
8
config.sh.example
Normal file
8
config.sh.example
Normal file
@@ -0,0 +1,8 @@
|
||||
DBSERVICE=
|
||||
DBUSERNAME=
|
||||
DBPASSWORD=
|
||||
HOSTIP=
|
||||
CLUSTERNAME=
|
||||
NODEID=
|
||||
DSRC_DIR=
|
||||
DATA_DIR=
|
||||
Reference in New Issue
Block a user