#!/usr/bin/env sh

# This script can be used to normalize environments at runtime, e.g.
# shift variables around on Kubernetes/Marathon. It's executed inside
# the Docker container.

set -e

# Our tooling generates RP_JAVA_OPTS so that we stay separate from
# JAVA_OPTS, so add that to JAVA_OPTS which the native packager script
# will respect.

if [ "$RP_JAVA_OPTS" != "" ]; then
  export JAVA_OPTS="$RP_JAVA_OPTS $JAVA_OPTS"
fi

exec "$@"
