Skip to content
Snippets Groups Projects
Commit 947b4269 authored by Marcel Loose's avatar Marcel Loose :sunglasses:
Browse files

Bug 1127:

* Python prior to verison 2.5 does not support the '--version' option. 
  Use '-V' instead.
* Output of 'python -V' is sent to stderr, which is not caught when binding
  file descriptors 1 and 2. Use '|& cat --' instead.
* Fixed a number of csh syntax errors.
parent 47042787
No related branches found
No related tags found
No related merge requests found
......@@ -29,10 +29,11 @@
set a_root = . #filled in by install
# Get python version.
set a_pyv=`python --version 2>&1`
set a_pyvv=`echo $a_pyv | sed -e "s/Python /([0.9]\.[0-9]\).*/\1/"`
if test "$a_pyv" = "$a_pyvv" then
set a_pyvv=2.5
set a_pyv=`python -V |& cat --`
set a_pyvv=`echo $a_pyv | sed -e "s/Python \([0-9]\.[0-9]\).*/\1/"`
# Fall-back: if python cannot be found assume Python 2.4
if ("$a_pyv" == "$a_pyvv") then
set a_pyvv=2.4
endif
# Only modify path variables if $a_root is an existing directory.
......@@ -79,7 +80,7 @@ else
if (! $?PYTHONPATH) then
setenv PYTHONPATH $a_pyt
else
setenv PYTHONPATH $a_pyt:$PYTHONPATH
setenv PYTHONPATH ${a_pyt}:$PYTHONPATH
endif
# Create a .glishrc.post in the HOME directory to append
......
......@@ -29,8 +29,9 @@
lfr_root=. #filled in by install
# Get python version.
a_pyv=`python --version 2>&1`
a_pyv=`python -V 2>&1`
a_pyvv=`echo $a_pyv | sed -e "s/Python \([0-9]\.[0-9]\).*/\1/"`
# Fall-back: if python cannot be found assume Python 2.4
if test "$a_pyv" = "$a_pyvv"; then
a_pyvv=2.4
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment