stopping if errors happen

This commit is contained in:
Arian Acosta 2017-07-15 14:39:49 -04:00
parent 8e20ec7617
commit b0a6f2d689

10
sync.sh
View File

@ -35,15 +35,15 @@ fi
if [ "$1" == "up" ] ; then if [ "$1" == "up" ] ; then
print_style "Initializing Docker Sync\n" "info"; 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"; print_style "(May take a long time (15min+) on the 'Looking for changes' step the first time)\n" "warning";
docker-sync start; docker-sync start &&
print_style "Initializing Docker Compose\n" "info"; print_style "Initializing Docker Compose\n" "info" &&
shift; # removing first argument shift && # removing first argument
docker-compose -f docker-compose.yml -f docker-compose.sync.yml up -d ${@}; docker-compose -f docker-compose.yml -f docker-compose.sync.yml up -d ${@};
elif [ "$1" == "down" ]; then elif [ "$1" == "down" ]; then
print_style "Stopping Docker Compose\n" "info"; print_style "Stopping Docker Compose\n" "info";
docker-compose down; docker-compose down &&
print_style "Stopping Docker Sync\n" "info"; print_style "Stopping Docker Sync\n" "info" &&
docker-sync stop; docker-sync stop;
elif [ "$1" == "install" ]; then elif [ "$1" == "install" ]; then