Fix home directory issue

This commit is contained in:
Christer Warén 2024-11-23 07:04:12 +02:00
parent dd72a873ab
commit 3d834933e7
2 changed files with 12 additions and 12 deletions

View File

@ -7,17 +7,17 @@ wx-infra(){
case $USERNAME in case $USERNAME in
cwchristerw) cwchristerw)
if [[ -d "/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra" ]] if [[ -d "$HOME/Desktop/Work in Progress/Programming/warengroup/infra" ]]
then then
INFRA_PATH="/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra" INFRA_PATH="$HOME/Desktop/Work in Progress/Programming/warengroup/infra"
else else
if [[ -d "~/.warengroup/infra" ]] if [[ -d "$HOME/.warengroup/infra" ]]
then then
INFRA_PATH="~/.warengroup/infra" INFRA_PATH="$HOME/.warengroup/infra"
else else
INFRA_PATH="~/.warengroup/infra" INFRA_PATH="$HOME/.warengroup/infra"
mkdir -p "$INFRA_PATH" &> /dev/null mkdir -p "$INFRA_PATH" &> /dev/null
git clone ssh://git@git.waren.io:2222/warengroup-private/infra.git --config core.sshCommand="ssh -i ~/.ssh/keys/warengroup-legacy -o ProxyJump=none" "$INFRA_PATH" git clone ssh://git@git.waren.io:2222/warengroup-private/infra.git --config core.sshCommand="ssh -i $HOME/.ssh/keys/warengroup-legacy -o ProxyJump=none" "$INFRA_PATH"
fi fi
fi fi

12
wx
View File

@ -140,17 +140,17 @@ wx-infra(){
case $USERNAME in case $USERNAME in
cwchristerw) cwchristerw)
if [[ -d "/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra" ]] if [[ -d "$HOME/Desktop/Work in Progress/Programming/warengroup/infra" ]]
then then
INFRA_PATH="/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra" INFRA_PATH="$HOME/Desktop/Work in Progress/Programming/warengroup/infra"
else else
if [[ -d "~/.warengroup/infra" ]] if [[ -d "$HOME/.warengroup/infra" ]]
then then
INFRA_PATH="~/.warengroup/infra" INFRA_PATH="$HOME/.warengroup/infra"
else else
INFRA_PATH="~/.warengroup/infra" INFRA_PATH="$HOME/.warengroup/infra"
mkdir -p "$INFRA_PATH" &> /dev/null mkdir -p "$INFRA_PATH" &> /dev/null
git clone ssh://git@git.waren.io:2222/warengroup-private/infra.git --config core.sshCommand="ssh -i ~/.ssh/keys/warengroup-legacy -o ProxyJump=none" "$INFRA_PATH" git clone ssh://git@git.waren.io:2222/warengroup-private/infra.git --config core.sshCommand="ssh -i $HOME/.ssh/keys/warengroup-legacy -o ProxyJump=none" "$INFRA_PATH"
fi fi
fi fi