]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #29664: omniORB: fix python path
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Mon, 18 Apr 2022 19:45:32 +0000 (21:45 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Mon, 18 Apr 2022 19:45:32 +0000 (21:45 +0200)
products/compil_scripts/omniORB.sh

index ff7df416e03c237285a0932cb7c07180573a2b6a..17c3ffe73f7b6d7f788266a809db1c4c00241a66 100755 (executable)
@@ -34,17 +34,17 @@ then
     echo "ERROR on make install"
     exit 3
 fi
+function version_ge() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" == "$1"; }
 
-if [[ $VERSION == "4.1.6" ]]
-then
+if version_ge $OT_VERSION "4.1" ; then
     # fix headers
     echo
     echo "*** fix headers"
     cd $PRODUCT_INSTALL/bin
-    sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidl > _omniidl
+    sed -e "s%#\!.*python%#\!/usr/bin/env python3%" omniidl > _omniidl
     mv -f _omniidl omniidl
     chmod a+x omniidl
-    sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidlrun.py > _omniidlrun.py
+    sed -e "s%#\!.*python%#\!/usr/bin/env python3%" omniidlrun.py > _omniidlrun.py
     mv -f _omniidlrun.py omniidlrun.py
     chmod a+x omniidlrun.py
 fi