From 92b545c937ef7bc25ec5021836d44213337ff1c5 Mon Sep 17 00:00:00 2001 From: anon_me Date: Tue, 2 Apr 2019 08:36:15 -0500 Subject: [PATCH 1/2] updated build_linux.sh to include stationapi which was removed from swg-main repo and put into its own repo --- build_linux.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build_linux.sh b/build_linux.sh index a90031f..d046e25 100755 --- a/build_linux.sh +++ b/build_linux.sh @@ -38,6 +38,7 @@ GIT_REPO_SRC=${GIT_URL}src.git GIT_REPO_DSRC=${GIT_URL}dsrc.git GIT_REPO_CONFIG=${GIT_URL}configs.git GIT_REPO_CLIENTDATA=${GIT_URL}clientdata.git +GIT_REPO_STATIONAPI=${GIT_URL}stationapi.git # specify git branches for each repo GIT_REPO_DEPEND_BRANCH=master @@ -45,6 +46,7 @@ GIT_REPO_SRC_BRANCH=master GIT_REPO_DSRC_BRANCH=master GIT_REPO_CONFIG_BRANCH=master GIT_REPO_CLIENTDATA_BRANCH=master +GIT_REPO_STATIONAPI_BRANCH=master echo -e "\033[1;31m"; if [ ! -f $basedir/.setup ]; then @@ -126,6 +128,13 @@ if [[ $response =~ ^(yes|y| ) ]]; then git pull cd $basedir fi + if [ ! -d $basedir/stationapi ]; then + git clone -b $GIT_REPO_STATIONAPI_BRANCH $GIT_REPO_STATIONAPI stationapi + else + cd $basedir/stationapi + git pull + cd $basedir + fi fi read -p "Is this for DEBUG mode or RELEASE mode? (d/r): " response From 4b3dbd95db2cafe770a0e0a3ab427a01a71af9aa Mon Sep 17 00:00:00 2001 From: Tekaoh <45337851+Tekaoh@users.noreply.github.com> Date: Tue, 2 Apr 2019 09:51:32 -0500 Subject: [PATCH 2/2] Check to see if stationapi is actually a repo Existing VMs will have a stationapi directory that is not hooked up to the repo. This will cause an error because the script will see the stationapi directory but then not be able to `git pull`. Solve this by checking for the .git directory instead. If it is missing, delete the stationapi directory and clone it from the repo. If .git is already present, go ahead and pull. --- build_linux.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_linux.sh b/build_linux.sh index d046e25..c2dd6fe 100755 --- a/build_linux.sh +++ b/build_linux.sh @@ -128,7 +128,8 @@ if [[ $response =~ ^(yes|y| ) ]]; then git pull cd $basedir fi - if [ ! -d $basedir/stationapi ]; then + if [ ! -d $basedir/stationapi/.git ]; then + rm -rf $basedir/stationapi git clone -b $GIT_REPO_STATIONAPI_BRANCH $GIT_REPO_STATIONAPI stationapi else cd $basedir/stationapi