From 824ca7168c8def3504265321807e3db2ef164508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Sun, 28 Apr 2024 01:26:18 +0300 Subject: [PATCH] Source Update --- src/functions/stop.sh | 14 ++++++-------- wx | 16 +++++++--------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/functions/stop.sh b/src/functions/stop.sh index be08ed2..187f73d 100644 --- a/src/functions/stop.sh +++ b/src/functions/stop.sh @@ -2,18 +2,16 @@ wx-stop () { echo " " echo " " echo " " - if [[ -d "./src" ]] + if [[ -f "./wx" ]] && [[ -d "./src" ]] then podman run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp docker.io/library/php:8-cli php generator.php &> /dev/null mv wx.tmp wx &> /dev/null chmod +x wx &> /dev/null - else - sudo curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o /opt/wx &> /dev/null - if [[ -d "/usr/bin" ]] - then - sudo ln -sf /opt/wx /usr/bin/wx &> /dev/null - fi - sudo chmod +x /usr/bin/wx &> /dev/null fi + + sudo curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o /opt/wx &> /dev/null + sudo ln -sf /opt/wx /usr/bin/wx &> /dev/null + sudo chmod +x /usr/bin/wx &> /dev/null + exit 1 } diff --git a/wx b/wx index 3419321..1a425cb 100755 --- a/wx +++ b/wx @@ -159,7 +159,7 @@ wx-login() { fi fi echo "" - echo $VAULT_LOGIN + wx-start else echo -n $wxBold @@ -222,19 +222,17 @@ wx-stop () { echo " " echo " " echo " " - if [[ -d "./src" ]] + if [[ -f "./wx" ]] && [[ -d "./src" ]] then podman run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp docker.io/library/php:8-cli php generator.php &> /dev/null mv wx.tmp wx &> /dev/null chmod +x wx &> /dev/null - else - sudo curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o /opt/wx &> /dev/null - if [[ -d "/usr/bin" ]] - then - sudo ln -sf /opt/wx /usr/bin/wx &> /dev/null - fi - sudo chmod +x /usr/bin/wx &> /dev/null fi + + sudo curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o /opt/wx &> /dev/null + sudo ln -sf /opt/wx /usr/bin/wx &> /dev/null + sudo chmod +x /usr/bin/wx &> /dev/null + exit 1 }