Skip to content
Permalink
Browse files
Make expire_clusters.sh executable from anywhere. (#82)
  • Loading branch information
smgoller committed May 10, 2019
1 parent e900c0b commit 707133adfedd3a4f9fb2523b54391031f42f06dd
Showing 1 changed file with 9 additions and 1 deletion.
@@ -16,13 +16,21 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
SCRIPTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
SCRIPTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

set -e

if [[ -z "${AWS_ACCESS_KEY_ID}" ]]; then
export AWS_PROFILE="geode-benchmarks"
fi

pushd ${SCRIPTDIR}
pushd ../../../
./gradlew expireClusters
popd
popd

0 comments on commit 707133a

Please sign in to comment.