Fix bootstrap
This commit is contained in:
parent
ff203d9dfe
commit
9fe4341c97
|
@ -4,12 +4,18 @@
|
||||||
[[ $(basename "$PWD") == "astroport" ]] && echo "DO NOT EXECUTE THIS SCRIPT INSIDE ASTROPORT FOLDER!" && exit 1
|
[[ $(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."
|
[[ -d astroport ]] && rm -rf astroport && echo "astroport folder has been deleted."
|
||||||
|
|
||||||
|
isp2plegal=$(nc -zv -w 1 192.168.9.19 3000)
|
||||||
|
if [[ $isp2plegal =~ "(?) open" ]]; then
|
||||||
|
isp2plegalbool=true
|
||||||
giturl="http://192.168.9.19:3000"
|
giturl="http://192.168.9.19:3000"
|
||||||
#giturl="https://git.p2p.legal"
|
else
|
||||||
|
isp2plegalbool=false
|
||||||
|
giturl="https://git.p2p.legal"
|
||||||
|
fi
|
||||||
|
|
||||||
git clone $giturl/axiom-team/astroport.git
|
git clone $giturl/axiom-team/astroport.git
|
||||||
cd astroport
|
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 update --init --recursive
|
||||||
git submodule foreach git pull origin master
|
git submodule foreach git pull origin master
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue