#!/bin/sh
LAUNCHPAD_RETURNCODE_FILE=$1
export LAUNCHPAD_RETURNCODE_FILE

shift

"$@"

LAUNCHPAD_EXEC_RETURN_CODE=$?; export LAUNCHPAD_EXEC_RETURN_CODE
echo $LAUNCHPAD_EXEC_RETURN_CODE >$LAUNCHPAD_RETURNCODE_FILE
exit $LAUNCHPAD_EXEC_RETURN_CODE
