48 lines
1.1 KiB
Bash
48 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
module unload gcc
|
|
module load gcc/7.3.0
|
|
|
|
|
|
|
|
if [ -z "$PS1" ]; then
|
|
echo "This shell is not interactive"
|
|
appName=$0
|
|
else
|
|
echo "This shell is interactive"
|
|
appName=$BASH_SOURCE
|
|
fi
|
|
|
|
|
|
|
|
# Select default Python Version here. Currently only 3.7 is supported
|
|
PYTHON_VERSION=3.7
|
|
|
|
if [ "$1" ]; then
|
|
if [ "$1" == "3.8" -o "$1" == "38" ]; then
|
|
echo "User requested python version $1 is not yet supported"
|
|
echo "Using default version $PYTHON_VERSION"
|
|
elif [ "$1" == "3.7" -o "$1" == "37" ]; then
|
|
PYTHON_VERSION=3.7
|
|
else
|
|
echo "User requested python version $1 is not supported"
|
|
echo "Using default version $PYTHON_VERSION"
|
|
fi
|
|
fi
|
|
|
|
echo "PYTHON_VERSION $PYTHON_VERSION"
|
|
|
|
|
|
# For use if script is sourced rather than executed
|
|
appNameDefault="examples.sh"
|
|
|
|
_EPICS_HOST_ARCH=${RHREL}-x86_64
|
|
_EPICS_BASE=base-7.0.9
|
|
|
|
. /opt/gfa/python $PYTHON_VERSION
|
|
|
|
export PYTHONPATH=.:
|
|
|
|
export LD_PRELOAD=/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libca.so:/usr/local/epics/${_EPICS_BASE}/lib/${_EPICS_HOST_ARCH}/libCom.so
|
|
python examples.py
|
|
unset LD_PRELOAD
|