From b0a6f2d68917f1b55467f3da94d57c75bef7140f Mon Sep 17 00:00:00 2001 From: Arian Acosta Date: Sat, 15 Jul 2017 14:39:49 -0400 Subject: [PATCH] stopping if errors happen --- sync.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sync.sh b/sync.sh index 46b15864..bd320a76 100755 --- a/sync.sh +++ b/sync.sh @@ -35,15 +35,15 @@ fi if [ "$1" == "up" ] ; then print_style "Initializing Docker Sync\n" "info"; print_style "(May take a long time (15min+) on the 'Looking for changes' step the first time)\n" "warning"; - docker-sync start; - print_style "Initializing Docker Compose\n" "info"; - shift; # removing first argument + docker-sync start && + print_style "Initializing Docker Compose\n" "info" && + shift && # removing first argument docker-compose -f docker-compose.yml -f docker-compose.sync.yml up -d ${@}; elif [ "$1" == "down" ]; then print_style "Stopping Docker Compose\n" "info"; - docker-compose down; - print_style "Stopping Docker Sync\n" "info"; + docker-compose down && + print_style "Stopping Docker Sync\n" "info" && docker-sync stop; elif [ "$1" == "install" ]; then