summaryrefslogtreecommitdiff
path: root/test/e2e/assets/entrypoint.sh
blob: ad2a3482d5811f8d4933feff2a336938999e7d99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
set -e

if test "$(id -u)" == "0" -a "${USER_ID}" != ""; then
  useradd -u ${USER_ID} -d /home/user -s /bin/bash ${USER_NAME:-default}
  chown -R "${USER_NAME:-default}" ${GOCACHE}
fi

export PATH=$PATH:/usr/local/go/bin:/go/bin
export GOROOT=/usr/local/go

"$@"