diff --git a/container-startup.sh b/container-startup.sh index f1458e46b..dc040ac3b 100755 --- a/container-startup.sh +++ b/container-startup.sh @@ -1,18 +1,19 @@ #!/usr/bin/env bash +# Set umask to DLS standard +umask 0002 + if [[ -z "${SCRATCH_AREA}" ]]; then SCRATCH_AREA="/blueapi-plugins/scratch" fi -mkdir -p ${SCRATCH_AREA} - -DIRS=`ls -1 ${SCRATCH_AREA}` - -echo "Loading Python packages from from ${DIRS}" - -for DIR in ${DIRS} -do - python -m pip install --no-deps -e "${SCRATCH_AREA}/${DIR}" -done +if [[ -d "${SCRATCH_AREA}" ]]; then + echo "Loading Python packages from ${SCRATCH_AREA}" + for DIR in ${SCRATCH_AREA}/*/; do # All directories + python -m pip install --no-deps -e "${DIR}" + done +else + echo "blueapi scratch area not present" +fi blueapi $@