diff --git a/src/commands/infra.sh b/src/commands/infra.sh index fbf753f..24e03ed 100644 --- a/src/commands/infra.sh +++ b/src/commands/infra.sh @@ -5,10 +5,15 @@ wx-infra(){ wx-header "Infra" wx-restricted - INFRA_PATH="/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra" - case $USERNAME in cwchristerw) + if [[ -d "/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra" ]] + INFRA_PATH="/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra" + else + INFRA_PATH="~/.warengroup/infra" + git clone https://git.waren.io/warengroup-private/infra --config core.sshCommand="ssh -i ~/.ssh/keys/warengroup-legacy" "$INFRA_PATH" + fi + if [[ -z $1 ]] then echo "Tag Required" diff --git a/wx b/wx index e301d56..2c3a5b3 100755 --- a/wx +++ b/wx @@ -138,10 +138,15 @@ wx-infra(){ wx-header "Infra" wx-restricted - INFRA_PATH="/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra" - case $USERNAME in cwchristerw) + if [[ -d "/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra" ]] + INFRA_PATH="/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra" + else + INFRA_PATH="~/.warengroup/infra" + git clone https://git.waren.io/warengroup-private/infra --config core.sshCommand="ssh -i ~/.ssh/keys/warengroup-legacy" "$INFRA_PATH" + fi + if [[ -z $1 ]] then echo "Tag Required"