File: entrypoint.sh

package info (click to toggle)
gromacs 2026~rc-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 274,216 kB
  • sloc: xml: 3,831,143; cpp: 686,111; ansic: 75,300; python: 21,171; sh: 3,553; perl: 2,246; yacc: 644; fortran: 397; lisp: 265; makefile: 174; lex: 125; awk: 68; csh: 39
file content (18 lines) | stat: -rwxr-xr-x 566 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash
set -e

# Set up user environment here.
cd $HOME
export PATH=/docker_entry_points:$PATH
# Activate the Python venv, if present for the current user.
# (testing user is default, but terminal user can be specified to `docker run`)
# Note: VENV defined in ci.dockerfile
test -f $VENV/bin/activate && source $VENV/bin/activate

if [ "$1" -a ! -x "$1" -a ! "$(which $1)" ]; then
    echo "Cannot execute $1"
    echo "Use an installed executable or one of the entry point scripts:"
    ls -1 /docker_entry_points | grep 'run_'
    exit 1
fi
exec "$@"