-
-
Save SimonWoolf/fc143bc2de24121efe5f5e020ea9eb89 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script expects an extracted slug to exist at /app, changes to that | |
# directory then execs whatever command was given on the command line. | |
set -eo pipefail | |
export HOME=/app | |
cd "${HOME}" | |
if [[ -d ".profile.d" ]]; then | |
for file in .profile.d/*; do | |
source "${file}" | |
done | |
fi | |
# Reset shell hash tables so the path to executable is not cached | |
hash -r | |
exec "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment