Permalink
Browse files

check for Python 2.4 before anything happens

  • Loading branch information...
timf committed Apr 30, 2010
1 parent a0004cc commit 1470f78f25a82a66b41a005748eb5b067a5028e7
Showing with 17 additions and 0 deletions.
  1. +10 −0 bin/install
  2. +7 −0 home/bin/nimbus-configure
View
@@ -1,5 +1,7 @@
#!/bin/bash
+PYTHON_EXE="/usr/bin/env python"
+
FORCE_FRESH_INSTALL="yes"
NIMBUS_SRC_REL="`dirname $0`/.."
@@ -34,6 +36,14 @@ if [ -d $NIMBUS_HOME ] && [ "$(ls -A $NIMBUS_HOME)" ]; then
fi
fi
+# returns 0 if Python 2.4+
+$PYTHON_EXE -c "import sys; sys.exit(sys.version_info < (2,4))"
+if [ $? -ne 0 ]; then
+ echo "ERROR: Your system must have Python version 2.4 or later."
+ exit 1
+fi
+
+
$NIMBUS_SRC/bin/create-nimbus-home $NIMBUS_HOME
if [ $? -ne 0 ]; then
@@ -21,6 +21,13 @@ export PYTHONPATH
# ------------------------------------------------------------------------------
+# returns 0 if Python 2.4+
+$PYTHON_EXE -c "import sys; sys.exit(sys.version_info < (2,4))"
+if [ $? -ne 0 ]; then
+ echo "ERROR: Your system must have Python version 2.4 or later."
+ exit 1
+fi
+
# The following script expands the tarballs in lib/
$NIMBUS_WEBDIR/sbin/install-deps.sh $DEBUG
if [ $? -ne 0 ]; then

0 comments on commit 1470f78

Please sign in to comment.