#!/bin/sh perlvers=5.00404 DEST_DIR=`echo $UPS_PROD_DIR | sed -e 's;/afs/fnal.gov;/afs/.fnal.gov;'` if [ "${ALTBIN:-}" = "" ] then case $UPS_PROD_DIR in /afs/fnal.gov/products/*) echo "Notice: in /afs installs, you probably want ALTBIN set" echo " to /afs/.fnal.gov/products/share/$UPS_PROD_FLAVOR" ;; esac fi if [ "$UPS_OPTIONS" = "test" ] then set -x mkdir -p /tmp/$USER/bin BIN=/tmp/$USER/bin ALTBIN=/tmp/$USER/bin else BIN=/usr/local/bin ALTBIN=${ALTBIN:=/usr/local/bin} fi if [ -w ${ALTBIN} ] then echo "Installing the ${DEST_DIR}/bin/setup_and_run_perl" echo "executable in ${ALTBIN}..." cp ${DEST_DIR}/bin/setup_and_run_perl ${ALTBIN}/setup_and_run_perl.new if [ -f ${ALTBIN}/setup_and_run_perl ] ; then rm -f ${ALTBIN}/setup_and_run_perl.old ln -f ${ALTBIN}/setup_and_run_perl ${ALTBIN}/setup_and_run_perl.old fi mv ${ALTBIN}/setup_and_run_perl.new ${ALTBIN}/setup_and_run_perl else echo "Not updating ${ALTBIN}, directory not writable" fi case ${ALTBIN} in /afs/.fnal.gov/*) upd_volrelease ${ALTBIN} ;; esac ALTBINRO=`echo ${ALTBIN}| sed -e 's;/afs/.fnal.gov;/afs/fnal.gov;'` if [ -w ${BIN} ] then for name in perl perl${perlvers} perlbug perldoc sperl${perlvers} suidperl do echo "linking ${ALTBINRO}/setup_and_run_perl" echo "as ${BIN}/${name}..." ln -s ${ALTBINRO}/setup_and_run_perl ${BIN}/${name}.new if [ -f ${BIN}/${name} ] ; then rm -f ${BIN}/${name}.old ln -f ${BIN}/${name} ${BIN}/${name}.old fi mv ${BIN}/${name}.new ${BIN}/${name} done else echo "Not updating ${BIN}, directory not writable" fi