From ee301359c70efbebd16c2879899baa254d963686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Fri, 26 Apr 2024 04:58:29 +0300 Subject: [PATCH] Source Update --- src/base.sh | 8 ++++++-- wx | 7 +++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/base.sh b/src/base.sh index dc8fd5d..294cbae 100644 --- a/src/base.sh +++ b/src/base.sh @@ -34,8 +34,12 @@ if [[ -d "./src" ]]; then echo ">>> Building... <<<" podman run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp docker.io/library/php:8-cli php generator.php else - cd /opt/wx - curl + echo ">>> Updating... <<<" + 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 } diff --git a/wx b/wx index b901c9c..bdc31d7 100755 --- a/wx +++ b/wx @@ -33,6 +33,13 @@ warencli-update() { if [[ -d "./src" ]]; then echo ">>> Building... <<<" podman run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp docker.io/library/php:8-cli php generator.php +else + echo ">>> Updating... <<<" + 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 }