From f22a6845feac83432bce632a7a82b7fc4081df25 Mon Sep 17 00:00:00 2001 From: Philip Joseph Date: Sat, 1 Oct 2016 12:41:03 +0530 Subject: [PATCH] Handle python not installed on ubnutu Signed-off-by: Philip Joseph --- BUILD.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/BUILD.sh b/BUILD.sh index 222ccad4..60f70b02 100755 --- 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" -- 2.25.1