From dad7a648c5f194c64b47884dcfbc952aae125450 Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Thu, 30 May 2024 12:33:42 +0200 Subject: [PATCH] fix: change `*` to `--all|-a` flag for install.sh and deploy.sh --- README.md | 6 +++--- deploy.sh | 8 +++++--- install.sh | 8 +++++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7ada6c5..7762388 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ sudo chmod +x ./install.sh sudo chmod +x ./deploy.sh # Install and deploy services -sudo ./install.sh * && sudo ./deploy.sh * +sudo ./install.sh --all && sudo ./deploy.sh --all ``` ## Installation @@ -37,7 +37,7 @@ sudo (bash|sh|zsh) ./install.sh [SERVICES...] ``` - Install all services. ```sh - sudo ./install.sh * + sudo ./install.sh -a ``` ## Déploiement @@ -60,5 +60,5 @@ sudo (bash|sh|zsh) ./deploy.sh [SERVICES...] ``` - Install all services. ```sh - sudo ./deploy.sh * + sudo ./deploy.sh -a ``` diff --git a/deploy.sh b/deploy.sh index e3ad47b..12ac9bb 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,8 +1,10 @@ APPS=$@ -if [[ $1 == "*" && $# -eq 1 ]]; then - APPS=$(ls -d */) -fi +if [[ $# -eq 1 ]]; then + if [[ $1 == "--all" $1 == "-a" ]]; then + APPS=$(ls -d */) + fi +fi for app in $APPS do diff --git a/install.sh b/install.sh index 58aaeca..fb98b3d 100644 --- a/install.sh +++ b/install.sh @@ -5,9 +5,11 @@ source ./_requirements.sh # Install services APPS=$@ -if [[ $1 == "*" && $# -eq 1 ]]; then - APPS=$(ls -d */) -fi +if [[ $# -eq 1 ]]; then + if [[ $1 == "--all" $1 == "-a" ]]; then + APPS=$(ls -d */) + fi +fi for app in $APPS do