From: Philip Joseph Date: Sat, 1 Oct 2016 07:11:03 +0000 (+0530) Subject: Handle python not installed on ubnutu X-Git-Tag: v1.0.0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=82187c0c66bba580f197b6daa00ec7e9e82258c7;p=osm%2FSO.git Handle python not installed on ubnutu Signed-off-by: Philip Joseph --- 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"