forked from cohabit/server_config
fix: change *
to --all|-a
flag for install.sh and deploy.sh
This commit is contained in:
parent
60b6731474
commit
dad7a648c5
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue