From 8808aa7b932e7c516d8d2f23566041a4ed47c704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Fri, 26 Apr 2024 06:22:52 +0300 Subject: [PATCH] Source Update --- src/base.sh | 33 ++++++++++++++++----------------- wx | 33 ++++++++++++++++----------------- 2 files changed, 32 insertions(+), 34 deletions(-) diff --git a/src/base.sh b/src/base.sh index e01302b..cfbe60d 100644 --- a/src/base.sh +++ b/src/base.sh @@ -18,26 +18,25 @@ echo -n " } start() { -syntax-line-douple -echo -n "Warén CLI " -syntax-line-douple -if [[ -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 - + syntax-line-douple + echo -n "Warén CLI " + syntax-line-douple } stop () { + if [[ -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 echo " " echo " " exit 1 diff --git a/wx b/wx index e01302b..cfbe60d 100755 --- a/wx +++ b/wx @@ -18,26 +18,25 @@ echo -n " } start() { -syntax-line-douple -echo -n "Warén CLI " -syntax-line-douple -if [[ -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 - + syntax-line-douple + echo -n "Warén CLI " + syntax-line-douple } stop () { + if [[ -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 echo " " echo " " exit 1