Fix bootstrap

This commit is contained in:
poka 2020-03-19 19:08:12 +01:00
parent ff203d9dfe
commit 9fe4341c97
1 changed files with 9 additions and 3 deletions

View File

@ -4,12 +4,18 @@
[[ $(basename "$PWD") == "astroport" ]] && echo "DO NOT EXECUTE THIS SCRIPT INSIDE ASTROPORT FOLDER!" && exit 1
[[ -d astroport ]] && rm -rf astroport && echo "astroport folder has been deleted."
giturl="http://192.168.9.19:3000"
#giturl="https://git.p2p.legal"
isp2plegal=$(nc -zv -w 1 192.168.9.19 3000)
if [[ $isp2plegal =~ "(?) open" ]]; then
isp2plegalbool=true
giturl="http://192.168.9.19:3000"
else
isp2plegalbool=false
giturl="https://git.p2p.legal"
fi
git clone $giturl/axiom-team/astroport.git
cd astroport
[[ $giturl =~ "192" ]] && sed -i 's/https:\/\/git.p2p.legal/http:\/\/192.168.9.19:3000/g' .gitmodules && echo "Infra p2p.legal detected, switch remotes submodules"
[[ $isp2plegalbool == true ]] && sed -i 's/https:\/\/git.p2p.legal/http:\/\/192.168.9.19:3000/g' .gitmodules && echo "Infra p2p.legal detected, switch remotes submodules"
git submodule update --init --recursive
git submodule foreach git pull origin master