Rhino: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 13: Line 13:
sudo mkdir -p /opt/cli/rhino1.7.14/bin
sudo mkdir -p /opt/cli/rhino1.7.14/bin
sudo tee  -a /opt/cli/rhino1.7.14/bin/rhino >/dev/null <<'EOF'
sudo tee  -a /opt/cli/rhino1.7.14/bin/rhino >/dev/null <<'EOF'
#!/bin/bash
#!/bin/bash
: '
: '
  @vendor    Chorke Academia, Inc.
  @vendor    Chorke Academia, Inc.
Line 22: Line 22:


export RHINO_HOME='/opt/cli/rhino1.7.14'
export RHINO_HOME='/opt/cli/rhino1.7.14'
export RHINO_EXEC="java ${RHINO_HOME}/lib/rhino-1.7.14.jar -debug -version 200"
export RHINO_EXEC="java -jar ${RHINO_HOME}/lib/rhino-1.7.14.jar -debug -version 200"


if [[ "${JAVA_HOME}/bin/java" != "/bin/java" ]]&&[[ -f "${JAVA_HOME}/bin/java" ]];then ${JAVA_HOME}/bin/${RHINO_EXEC}
if [ -f "${JAVA_HOME}/bin/java" ];then ${JAVA_HOME}/bin/${RHINO_EXEC}
elif [ -x "$(command -v java)" ];then ${RHINO_EXEC}
elif [ -x "$(command -v java)" ];then ${RHINO_EXEC}
else printf '\njava 3 \033[0;31mnot found! \033[0m:(\n';fi
else printf '\njava 3 \033[0;31mnot found! \033[0m:(\n';fi

Revision as of 04:06, 8 July 2022

sudo wget -c https://github.com/mozilla/rhino/releases/download\
/Rhino1_7_14_Release/rhino-1.7.14.zip -P /opt/cli/

sudo unzip  /opt/cli/rhino-1.7.14.zip -d /opt/cli/
sudo rm -rf /opt/cli/rhino-1.7.14.zip

sudo rm -rf /opt/cli/rhino1.7.14\
/{src,docs,*gradle*,*.txt,*.md}
sudo mkdir -p /opt/cli/rhino1.7.14/bin
sudo tee   -a /opt/cli/rhino1.7.14/bin/rhino >/dev/null <<'EOF'
#!/bin/bash
: '
 @vendor    Chorke Academia, Inc.
 @web       https://cdn.chorke.org/docs/academia
 @version   1.0.00
 @since     1.0.00
'

export RHINO_HOME='/opt/cli/rhino1.7.14'
export RHINO_EXEC="java -jar ${RHINO_HOME}/lib/rhino-1.7.14.jar -debug -version 200"

if [ -f "${JAVA_HOME}/bin/java" ];then ${JAVA_HOME}/bin/${RHINO_EXEC}
elif [ -x "$(command -v java)" ];then ${RHINO_EXEC}
else printf '\njava 3 \033[0;31mnot found! \033[0m:(\n';fi
EOF

References