File indexing completed on 2026-04-25 08:29:08
0001 if [ -z "$BASH_VERSION" ]; then
0002 echo "This script must be sourced in bash"
0003 return 1
0004 fi
0005
0006 OS=$( hostnamectl | awk '/Operating System/{ print $3" "$4 }' )
0007
0008
0009
0010
0011 echo "Setting up sPHENIX Production for ${OS}"
0012
0013
0014 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
0015 echo "Using scripts in sys: ${SCRIPT_DIR}"
0016
0017 source /opt/sphenix/core/bin/sphenix_setup.sh -n new
0018 export PATH=${PATH}:${HOME}/bin:./bin
0019 export ODBCINI=./.odbc.ini
0020
0021 export PYTHONPATH=${PYTHONPATH}:${SCRIPT_DIR}
0022 export PATH=${PATH}:${SCRIPT_DIR}
0023
0024 echo Using $(python --version)
0025
0026 set_bash_prompt() {
0027
0028 local branch=$( git -C ${SCRIPT_DIR} rev-parse --abbrev-ref HEAD 2> /dev/null )
0029
0030 local branch_color_status="\[\e[31m\]"
0031 if [[ "$branch" == "main" ]] ; then
0032 branch_color_status="\[\e[34m\]"
0033 fi
0034
0035
0036 if [ -n "$(git -C ${SCRIPT_DIR} status --porcelain -uno)" ]; then
0037 branch_color_status="${branch_color_status}\[\e[1m\]"
0038 fi
0039 PS1="\h:\w${branch_color_status} git:${branch}\[\e[0m\]> "
0040 }
0041 PROMPT_COMMAND=set_bash_prompt
0042
0043 if [[ "$-" == *i* ]]; then
0044
0045 :
0046 else
0047 echo "Non-interactive shell"
0048 return 0
0049 fi
0050
0051
0052 alias cqb='condor_q -batch'
0053 alias cs='condor_submit'
0054 alias gristory='history | grep -v istory| grep $@'
0055 alias rehash='hash -r'
0056
0057
0058
0059 if [[ `ssh-add -l` =~ "eickolja" ]] ; then
0060 echo "Hello Kolja"
0061 export GIT_CONFIG_GLOBAL=/sphenix/u/sphnxpro/.gitconfig.kolja
0062 git config --global user.name "Kolja Kauder"
0063 git config --global user.email "kkauder@gmail.com"
0064
0065 git config --global push.autoSetupRemote true
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076 bind '"\e[A": history-search-backward'
0077 bind '"\e[B": history-search-forward'
0078
0079
0080 alias psql='psql -P pager=off'
0081
0082 fi