From 538a99b956ddbde29c53d4e852a71871161dc656 Mon Sep 17 00:00:00 2001 From: andryyy Date: Fri, 8 Sep 2017 10:02:50 +0200 Subject: [PATCH] [Update.sh] Move dependencies to loop --- update.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/update.sh b/update.sh index dd89573f..62b23d10 100755 --- a/update.sh +++ b/update.sh @@ -1,11 +1,8 @@ #!/bin/bash -if [[ -z $(which curl) ]]; then echo "Cannot find curl, exiting."; exit 1; fi -if [[ -z $(which docker-compose) ]]; then echo "Cannot find docker-compose, exiting."; exit 1; fi -if [[ -z $(which docker) ]]; then echo "Cannot find docker, exiting."; exit 1; fi -if [[ -z $(which git) ]]; then echo "Cannot find git, exiting."; exit 1; fi -if [[ -z $(which awk) ]]; then echo "Cannot find awk, exiting."; exit 1; fi -if [[ -z $(which sha1sum) ]]; then echo "Cannot find sha1sum, exiting."; exit 1; fi +for bin in curl docker-compose docker git awk sha1sum; do + if [[ -z $(which ${bin}) ]]; then echo "Cannot find ${bin}, exiting..."; exit 1; fi +done CONFIG_ARRAY=("SKIP_LETS_ENCRYPT" "SKIP_CLAMD" "SKIP_IP_CHECK" "SKIP_FAIL2BAN" "ADDITIONAL_SAN" "DOVEADM_PORT") echo >> mailcow.conf