Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
quickstart.sh 1.38 KiB
#!/bin/bash
#
# Quickstart script for Practical Beamline Controls Training Session 2: IOC Deployment and Troubleshooting
#

EPICS_HOST_ARCH=`uname -r | sed -e 's/.*el\([6789]\).*/rhel\1-x86_64/g'`
# Alternate EPICS_HOST_ARCH approach:
#!RHEL_MAJOR_VERSION=`facter operatingsystemrelease | colrm 2`
#!EPICS_HOST_ARCH="rhel${RHEL_MAJOR_VERSION}-x86_64"

case ${SHELL} in

  *bash)
    echo "Run the following commands:"
    echo ""
    echo 'export EPICS_DIR=${HOME}/PET-S2/epics'
    echo 'export IOC_DIR=${EPICS_DIR}/synApps_6_2_1/ioc'
    echo 'export SUPPORT_DIR=${EPICS_DIR}/synApps_6_2_1/support'
    echo "export EPICS_HOST_ARCH=${EPICS_HOST_ARCH}"
    echo "unset EPICS_BASE"
    echo "unset EPICS_CA_ADDR_LIST"
    echo "unset EPICS_CA_AUTO_ADDR_LIST"
    echo 'mkdir -p ${IOC_DIR} ${SUPPORT_DIR}'
    echo 'tree ${EPICS_DIR}'
    echo ""
    ;;

  *tcsh)
    echo "Run the following commands:"
    echo ""
    echo 'setenv EPICS_DIR ${HOME}/PET-S2/epics'
    echo 'setenv IOC_DIR ${EPICS_DIR}/synApps_6_2_1/ioc'
    echo 'setenv SUPPORT_DIR ${EPICS_DIR}/synApps_6_2_1/support'
    echo "setenv EPICS_HOST_ARCH ${EPICS_HOST_ARCH}"
    echo "unsetenv EPICS_BASE"
    echo "unsetenv EPICS_CA_ADDR_LIST"
    echo "unsetenv EPICS_CA_AUTO_ADDR_LIST"
    echo 'mkdir -p ${IOC_DIR} ${SUPPORT_DIR}'
    echo 'tree ${EPICS_DIR}'
    echo ""
    ;;

  *)
    echo "Unsupported shell! Use bash or tcsh"
    ;;

esac