diff --git a/_common/functions.sh b/_common/functions.sh new file mode 100644 index 0000000..6d3a931 --- /dev/null +++ b/_common/functions.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +pushd () { + command pushd "$@" > /dev/null +} + +popd () { + command popd "$@" > /dev/null +} diff --git a/cluster/start.sh b/cluster/start.sh index 0009d19..00b9a1b 100755 --- a/cluster/start.sh +++ b/cluster/start.sh @@ -13,6 +13,8 @@ COMPOSE_FILE_COMMAND+=("--project-name" "$PROJECT") # Where is this script? It could be called from anywhere, so use this to get full paths. SCRIPTPATH="$( cd "$(dirname "$0")"; pwd -P )" +source "$SCRIPTPATH/../_common/functions.sh" + while getopts n:h o; do case "$o" in n) diff --git a/cluster_with_federation/start.sh b/cluster_with_federation/start.sh index 0009d19..00b9a1b 100755 --- a/cluster_with_federation/start.sh +++ b/cluster_with_federation/start.sh @@ -13,6 +13,8 @@ COMPOSE_FILE_COMMAND+=("--project-name" "$PROJECT") # Where is this script? It could be called from anywhere, so use this to get full paths. SCRIPTPATH="$( cd "$(dirname "$0")"; pwd -P )" +source "$SCRIPTPATH/../_common/functions.sh" + while getopts n:h o; do case "$o" in n) diff --git a/federation/start.sh b/federation/start.sh index c616a88..d1d0b1a 100755 --- a/federation/start.sh +++ b/federation/start.sh @@ -13,6 +13,8 @@ COMPOSE_FILE_COMMAND+=("--project-name" "$PROJECT") # Where is this script? It could be called from anywhere, so use this to get full paths. SCRIPTPATH="$( cd "$(dirname "$0")"; pwd -P )" +source "$SCRIPTPATH/../_common/functions.sh" + while getopts n:h o; do case "$o" in n)