mirror of
https://github.com/hcartiaux/dotfiles.git
synced 2024-10-18 17:25:23 +02:00
148 lines
4.1 KiB
Bash
148 lines
4.1 KiB
Bash
#
|
|
# ~/.bash_environments
|
|
#
|
|
|
|
# ----------------------------------------------------------------------
|
|
# LOCALES
|
|
# ----------------------------------------------------------------------
|
|
|
|
# enable en_US locale w/ UTF-8 encodings
|
|
: ${LANG:="en_US.UTF-8"}
|
|
: ${LANGUAGE:="en"}
|
|
: ${LC_CTYPE:="en_US.UTF-8"}
|
|
: ${LC_ALL:="en_US.UTF-8"}
|
|
|
|
export LANG LANGUAGE LC_CTYPE LC_ALL
|
|
|
|
# ----------------------------------------------------------------------
|
|
# SYSTEM INFO
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Basic variables
|
|
: ${HOME=~}
|
|
: ${LOGNAME=$(id -un)}
|
|
: ${UNAME=$(uname)}
|
|
|
|
# complete hostnames from this file
|
|
: ${HOSTFILE=~/.ssh/known_hosts}
|
|
|
|
# readline config
|
|
: ${INPUTRC=~/.inputrc}
|
|
|
|
# Get rid of mail notification
|
|
unset MAILCHECK
|
|
|
|
# Configure a set of useful variables
|
|
if [[ "`echo $UNAME | grep -c -i -e '^.*bsd$'`" == "1" ]] ; then
|
|
FQDN=`hostname`
|
|
else
|
|
FQDN=`hostname -f`
|
|
fi
|
|
DOMAIN=`echo $FQDN | cut -d '.' -f 2`
|
|
|
|
# ----------------------------------------------------------------------
|
|
# SHELL TYPE
|
|
# ----------------------------------------------------------------------
|
|
|
|
# detect interactive shell
|
|
case "$-" in
|
|
*i*) INTERACTIVE=yes ;;
|
|
*) unset INTERACTIVE ;;
|
|
esac
|
|
|
|
# detect login shell
|
|
case "$0" in
|
|
-*) LOGIN=yes ;;
|
|
*) unset LOGIN ;;
|
|
esac
|
|
|
|
# ----------------------------------------------------------------------
|
|
# PATH - /usr/local
|
|
# ----------------------------------------------------------------------
|
|
|
|
# we want the various sbins on the path along with /usr/local/bin
|
|
export PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin"
|
|
export PATH="/usr/local/bin:$PATH"
|
|
|
|
# Programming stuff
|
|
# pkg-config settings
|
|
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
|
|
# C/C++ include
|
|
export C_INCLUDE_PATH=/usr/local/include
|
|
export CPLUS_INCLUDE_PATH=${C_INCLUDE_PATH}
|
|
export LIBRARY_PATH=/usr/lib:/usr/local/lib
|
|
export DYLD_FALLBACK_LIBRARY_PATH=${LIBRARY_PATH}
|
|
|
|
# put ~/bin on PATH if you have it
|
|
if [ -d "$HOME/bin" ]; then
|
|
export PATH="$PATH:$HOME/bin:."
|
|
fi
|
|
export MANPATH="/usr/share/man:/usr/local/share/man:$MANPATH"
|
|
|
|
# ----------------------------------------------------------------------
|
|
# EDITOR & PAGER
|
|
# ----------------------------------------------------------------------
|
|
|
|
test -n "$(command -v vim)" && EDITOR=vim || EDITOR=nano
|
|
export EDITOR
|
|
export SVN_EDITOR=$EDITOR
|
|
|
|
# Default pager ('less' is so much better than 'more'...)
|
|
if test -n "$(command -v less)" ; then
|
|
PAGER="less -FirSwX"
|
|
else
|
|
PAGER=more
|
|
fi
|
|
|
|
# ----------------------------------------------------------------------
|
|
# VCS Configuration
|
|
# ----------------------------------------------------------------------
|
|
|
|
export CVS_RSH='ssh'
|
|
|
|
export GIT_AUTHOR='Hyacinthe Cartiaux'
|
|
export GIT_AUTHOR_EMAIL='Hyacinthe.Cartiaux@uni.lu'
|
|
export GIT_COMMITER=$GIT_AUTHOR
|
|
export GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL
|
|
|
|
# ----------------------------------------------------------------------
|
|
# MISC
|
|
# ----------------------------------------------------------------------
|
|
|
|
unset SSH_ASKPASS
|
|
|
|
# Easybuild BUILD PATH
|
|
export EASYBUILDBUILDPATH=/tmp/
|
|
|
|
# Tsocks config
|
|
export TSOCKS_CONF_FILE=~/.dotfiles/tsocks/tsocks.conf
|
|
|
|
# BC configuration for interactive usage
|
|
test -n "$INTERACTIVE" && export BC_ENV_ARGS=~/.dotfiles/bc/bcrc
|
|
|
|
# PDSH configuration
|
|
PDSH_SSH_ARGS_APPEND="-q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PreferredAuthentications=publickey"
|
|
|
|
# ----------------------------------------------------------------------
|
|
# GRID5000 specific
|
|
# ----------------------------------------------------------------------
|
|
|
|
if [[ -n "`echo $FQDN | grep -o .grid5000.fr`" ]] ; then
|
|
export OAR_JOB_KEY_FILE=~/.ssh/id_rsa
|
|
export HTTP_PROXY=http://proxy:3128
|
|
export HTTPS_PROXY=$HTTP_PROXY
|
|
fi
|
|
|
|
# ----------------------------------------------------------------------
|
|
# GAIA specific (XCS Portal config)
|
|
# ----------------------------------------------------------------------
|
|
|
|
if [[ "$DOMAIN" = "gaia-cluster" ]] ; then
|
|
# XF
|
|
source /XF/App/Scripts/xf_Globalenv.rc
|
|
export PATH=$PATH:/XF/Admin/Scripts
|
|
export XF_VNC_GEOMETRY="-geometry 1366x850"
|
|
export XF_VNC_QUALITY=80
|
|
#export XF_DEBUG=0
|
|
fi
|
|
|