[Assorted-commits] SF.net SVN: assorted:[1541] shell-tools/trunk/src/bash-commons/bashrc.bash
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-12-31 01:06:05
|
Revision: 1541 http://assorted.svn.sourceforge.net/assorted/?rev=1541&view=rev Author: yangzhang Date: 2009-12-31 01:05:58 +0000 (Thu, 31 Dec 2009) Log Message: ----------- initialize python path for PYTHONVERSION if avail otherwise autodetect Modified Paths: -------------- shell-tools/trunk/src/bash-commons/bashrc.bash Modified: shell-tools/trunk/src/bash-commons/bashrc.bash =================================================================== --- shell-tools/trunk/src/bash-commons/bashrc.bash 2009-12-31 01:04:22 UTC (rev 1540) +++ shell-tools/trunk/src/bash-commons/bashrc.bash 2009-12-31 01:05:58 UTC (rev 1541) @@ -131,6 +131,9 @@ prepend_std CPLUS_INCLUDE_PATH include prepend_std OBJC_INCLUDE_PATH include +# TODO Move this further up? +. common.bash -n + # bash # don't put duplicate lines in the history @@ -140,8 +143,6 @@ shopt -s checkwinsize # TODO check this hist size (for sanity) -shopt -s extglob - # perl prepend_std PERL5LIB lib/perl5/site_perl lib/perl share/perl @@ -150,11 +151,11 @@ export PYTHONSTARTUP="$HOME/.pythonrc.py" pythonpath_prepend= -ver=${PYTHONVERSION} -if [[ ! "$ver" ]] && type python >& /dev/null -then ver="$( python -c 'import sys; print ".".join(map(str,sys.version_info[0:2]))' )" +PYTHONVERSION=${PYTHONVERSION:-} +if [[ ! "$PYTHONVERSION" ]] && type python >& /dev/null +then PYTHONVERSION="$(python-version)" fi -for ver in $ver ; do +for ver in $PYTHONVERSION ; do pythonpath_prepend="$USER_PREFIX/lib/python$ver/site-packages:$pythonpath_prepend" pythonpath_prepend="$USER_TOAST_PREFIX/lib/python$ver/site-packages:$pythonpath_prepend" pythonpath_prepend="/usr/local/lib/python$ver/site-packages:$pythonpath_prepend" @@ -186,8 +187,7 @@ export UNISONBACKUPDIR=~/.unison/backup export UNISON=~/.unison -# TODO Move this further up? -. common.bash -n +# less if ! have less.sh ; then export PATH="/usr/local/share/vim/vim71/macros/:$PATH" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |