From c3cf552ffc38514486ebb8558ea1ac840413b4d4 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Mon, 2 Jan 2023 14:17:40 +0100 Subject: [PATCH] spns #32335: some projects still rely on Python 2. Implement a switch based on Python major version number --- products/compil_scripts/omniORB.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/products/compil_scripts/omniORB.sh b/products/compil_scripts/omniORB.sh index 475fd5c..632712f 100755 --- a/products/compil_scripts/omniORB.sh +++ b/products/compil_scripts/omniORB.sh @@ -47,6 +47,8 @@ if version_ge $VERSION "4.1" ; then if [ $? -ne 0 ]; then echo ERROR: Failed to extract major Python version - assuming Python version equal to 3... pyVersionMajor=python3 + elif [ "${pyVersionMajor}" == "python2" ]; then + pyVersionMajor=python fi echo INFO: Python version major: ${pyVersionMajor} sed -e "s%#\!.*python[0-9]*%#\!/usr/bin/env ${pyVersionMajor}%" omniidl > _omniidl -- 2.39.2