File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash -p
2
2
# ^ -p protects us from shellshock
3
3
4
+ # pick a python
5
+ if command -v python > /dev/null 2>&1 ; then
6
+ python=python
7
+ elif command -v python3 > /dev/null 2>&1 ; then
8
+ python=python3
9
+ elif command -v python2 > /dev/null 2>&1 ; then
10
+ python=python2
11
+ elif test -x /usr/libexec/platform-python; then
12
+ python=/usr/libexec/platform-python
13
+ else
14
+ echo >&2 " Can't find Python"
15
+ fi
16
+
17
+
4
18
realdir ()
5
19
{
6
20
# print the canonical path of a directory, resolving symlinks in
@@ -217,11 +231,11 @@ ps -u xrootd u
217
231
echo " "
218
232
219
233
echo " ***** Python information:"
220
- python -c " import sys; print 'Version: ' + sys.version"
221
- python -c " import sys; print 'Executable: ' + sys.executable"
222
- python -c " import sys; print 'Prefix: ' + sys.prefix"
223
- python -c ' import platform; print "Architecture: ",; print platform.architecture()'
224
- python -c " import sys; print 'Search paths: ',; print sys.path"
234
+ $ python -c " import sys; print( 'Version: ' + sys.version) "
235
+ $ python -c " import sys; print( 'Executable: ' + sys.executable) "
236
+ $ python -c " import sys; print( 'Prefix: ' + sys.prefix) "
237
+ $ python -c ' import platform; print( "Architecture: " + str( platform.architecture()) )'
238
+ $ python -c " import sys; print( 'Search paths: ' + str( sys.path)) "
225
239
echo " "
226
240
227
241
run_cmd openssl version
You can’t perform that action at this time.
0 commit comments