From acbafdf190b92d9c24764c287cd4905ba6095be9 Mon Sep 17 00:00:00 2001 From: Maksymilian Potok Date: Sat, 17 Oct 2020 15:29:02 +0200 Subject: [PATCH] fix installing/hardcoding --- devscripts/install_jython.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/devscripts/install_jython.sh b/devscripts/install_jython.sh index bafca4da4..0b3bed930 100755 --- a/devscripts/install_jython.sh +++ b/devscripts/install_jython.sh @@ -1,5 +1,19 @@ #!/bin/bash - -wget http://central.maven.org/maven2/org/python/jython-installer/2.7.1/jython-installer-2.7.1.jar -java -jar jython-installer-2.7.1.jar -s -d "$HOME/jython" -$HOME/jython/bin/jython -m pip install nose + +version="jython-installer-2.7.2.jar" +url="https://repo1.maven.org/maven2/org/python/jython-installer/2.7.2/jython-installer-2.7.2.jar" +pkg="java" +pkg_ok=$(dpkg-query -W --showformat='${Status}\n' $pkg | grep "install ok installed") + +echo "Downloading source" +#wget $url +echo "Installing jython" +if [ "" = "$pkg_ok" ]; then + echo "$pkg is not installed. Setting this up now." + apt-get update + apt-get install openjdk-8-jdk + java - version +fi +java -jar $version -s -d "$HOME/jython" +echo "Installing nose" +$HOME/jython/bin/jython -m pip install nose \ No newline at end of file