This commit is contained in:
Gobbo Alexandre
2025-08-12 16:03:40 +02:00
parent d7f52c2c77
commit acc8c59492

35
pshell
View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
#Check if running as e-account
@@ -53,6 +53,7 @@ done
#Parse JVM arguments, Pshell version and JEP option
export PSHELL_VER=default
export VER_SUFFIX=
export JVM_ARGS=
export JVM_UCP=
#export JAVA_VER=/opt/gfa/java/openjdk-1.8.0_40
@@ -66,36 +67,42 @@ case $i in
-jvmarg=*)
JVM_ARGS="${i#*=}"
#echo 'JVM args:' ${JVM_ARGS}
shift
#shift
;;
-ucp=*)
UCP="${i#*=}"
#echo 'UCP:' ${UCP}
shift
#shift
;;
-version=*|--version=*)
export PSHELL_VER="${i#*=}"
echo "Using version " ${PSHELL_VER}
#echo "Using version " ${PSHELL_VER}
#shift
;;
-test)
export PSHELL_VER=testing
echo "Using testing version"
#echo "Using testing version"
#shift
;;
-last)
export PSHELL_VER=latest
echo "Using latest version"
#echo "Using latest version"
#shift
;;
-light)
export VER_SUFFIX=-light
#echo "Using build type " ${VER_SUFFIX}
#shift
;;
-javaver=*|--javaver=*)
export JAVA_VER="${i#*=}"
echo "Using java version " ${JAVA_VER}
echo "Using Java version " ${JAVA_VER}
#shift
;;
@@ -129,6 +136,13 @@ done
# fi
#fi
if [[ $VER_SUFFIX != "" ]] ; then
PSHELL_VER=${PSHELL_VER}${VER_SUFFIX}
fi
if [[ $PSHELL_VER != "default" ]] ; then
echo "Using PShell version:" ${PSHELL_VER}
fi
export JVM_EARGS=
@@ -139,17 +153,17 @@ if [[ $JAVA_VER != *"1.8.0"* ]]; then
fi
#Standard startup
if [[ $@ != **-py** ]] ; then
if [[ $@ != **-py** || $VER_SUFFIX == "-light" ]] ; then
#if [[ $JEP == "" ]] ; then
if [[ $UCP == "" ]] ; then
#echo 'Standard launch'
${JAVA_VER}/bin/java ${JVM_EARGS} ${JVM_ARGS} -jar /opt/gfa/pshell/${PSHELL_VER} ${1+"$@"}
exit
fi
fi
if [[ $@ == **-py** ]] ; then
if [[ $@ == **-py** && $VER_SUFFIX != "-light" ]] ; then
#Using JEP
#First clean path and vars
#unset JCPDS_PATH
@@ -168,7 +182,6 @@ for p in $(echo $PATH | sed 's/:/ /g') ; do
fi
done
if [[ $@ == **-py35** ]] ; then
#Python 3
echo "Setting Python 3.5 for JEP"