#!/usr/bin/env bash # Run a specified deployment subcommand on all nodes SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) source ${SCRIPT_DIR}/lib.sh usage="Usage: $0 " if [[ -n "$1" ]]; then machine_name_prefix=$1 else echo ${usage} exit 1 fi if [[ -n "$2" ]]; then subcommand=$2 else echo ${usage} exit 1 fi deployment_dir=${machine_name_prefix}-deployment deployment_command="${so_command} deployment --dir ${deployment_dir} ${subcommand}" run_on_all_nodes ${machine_name_prefix} "${deployment_command}"