-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart
26 lines (24 loc) · 843 Bytes
/
start
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
set -euo pipefail
# Start - Set any environment variables here
# These are inherited by all processes, *except* RStudio
# USE export <parname>=value
# source this file to get the variables defined in the rocker Dockerfile
# this is a series of export cmds
if [ -f "${REPO_DIR}/env.txt" ]; then
source "${REPO_DIR}/env.txt"
fi
# End - Set any environment variables here
# Run child start scripts in a subshell to contain its environment
# ${REPO_DIR}/childstart/ is created by setup-start.sh
if [ -d "${REPO_DIR}/childstart/" ]; then
for script in ${REPO_DIR}/childstart/*; do
if [ -f "$script" ]; then
echo "Sourcing script: $script"
source "$script" || {
echo "Error: Failed to source $script. Moving on to the next script."
}
fi
done
fi
exec "$@"