Handle python not installed on ubnutu 64/464/1 v1.0.0
authorPhilip Joseph <philip.joseph@riftio.com>
Sat, 1 Oct 2016 07:11:03 +0000 (12:41 +0530)
committerPhilip Joseph <philip.joseph@riftio.com>
Sat, 1 Oct 2016 07:11:03 +0000 (12:41 +0530)
Signed-off-by: Philip Joseph <philip.joseph@riftio.com>
BUILD.sh

index 222ccad..60f70b0 100755 (executable)
--- a/BUILD.sh
+++ b/BUILD.sh
@@ -95,9 +95,14 @@ set -x             # Print commands before executing them
 
 ###############################################################################
 # Find the platform
-if python -mplatform | grep -qi fedora; then
+PYTHON=python
+if [[ ! -f /usr/bin/python ]]; then
+  PYTHON=python3
+fi
+
+if $PYTHON -mplatform | grep -qi fedora; then
     PLATFORM=fc20
-elif python -mplatform | grep -qi ubuntu; then
+elif $PYTHON -mplatform | grep -qi ubuntu; then
     PLATFORM=ub16
 else
     echo "Unknown platform"