Repository: storm
Updated Branches:
  refs/heads/master 9081a7d0f -> 71733add4


use '/usr/bin/env python' to check python version


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/20f1497c
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/20f1497c
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/20f1497c

Branch: refs/heads/master
Commit: 20f1497c213c97a8a72b2f43039ad59ce9ce5169
Parents: b477939
Author: 卫乐 <[email protected]>
Authored: Wed Mar 9 16:05:04 2016 +0800
Committer: 卫乐 <[email protected]>
Committed: Wed Mar 9 16:05:04 2016 +0800

----------------------------------------------------------------------
 bin/storm | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/20f1497c/bin/storm
----------------------------------------------------------------------
diff --git a/bin/storm b/bin/storm
index 0963065..dfc5d8e 100755
--- a/bin/storm
+++ b/bin/storm
@@ -30,16 +30,8 @@ while [ -h "${PRG}" ]; do
   fi
 done
 
-# find python >= 2.6
-if [ -a /usr/bin/python2.6 ]; then
-  PYTHON=/usr/bin/python2.6
-fi
-
-if [ -z "$PYTHON" ]; then
-  PYTHON=/usr/bin/python
-fi
-
 # check for version
+PYTHON="/usr/bin/env python"
 majversion=`$PYTHON -V 2>&1 | awk '{print $2}' | cut -d'.' -f1`
 minversion=`$PYTHON -V 2>&1 | awk '{print $2}' | cut -d'.' -f2`
 numversion=$(( 10 * $majversion + $minversion))
@@ -71,4 +63,4 @@ if [ -f "${STORM_CONF_DIR}/storm-env.sh" ]; then
   . "${STORM_CONF_DIR}/storm-env.sh"
 fi
 
-exec "$PYTHON" "${STORM_BIN_DIR}/storm.py" "$@"
+exec "${STORM_BIN_DIR}/storm.py" "$@"

Reply via email to