Mise à jour de 'installJava.sh'
This commit is contained in:
parent
8bd1bef938
commit
f8bab090c1
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
# On récupère la dernière version d'Obsidian
|
# On récupère la dernière version d'AdoptOpenJDK-16
|
||||||
wget -q https://api.github.com/repos/ibmruntimes/semeru16-binaries/releases
|
wget -q https://api.github.com/repos/ibmruntimes/semeru16-binaries/releases
|
||||||
echo "Retrieve the last package..."
|
echo "Retrieve the last package..."
|
||||||
grep 'browser_download_url": *"' releases | awk '{ print substr ($0, 34 ) }' | awk '{ print substr( $0, 1, length($0)-1 ) }' | sed 's/\"//' | grep 'open-jdk_x64_linux' | grep -zoP '.*gz\n' | sed -n '1p' > url
|
grep 'browser_download_url": *"' releases | awk '{ print substr ($0, 34 ) }' | awk '{ print substr( $0, 1, length($0)-1 ) }' | sed 's/\"//' | grep 'open-jdk_x64_linux' | grep -zoP '.*gz\n' | sed -n '1p' > url
|
||||||
|
@ -9,7 +9,9 @@ rm url
|
||||||
tar xvzf java.tar.gz
|
tar xvzf java.tar.gz
|
||||||
rm java.tar.gz
|
rm java.tar.gz
|
||||||
mv jdk* jdk-16
|
mv jdk* jdk-16
|
||||||
|
# On le place dans le dossier /usr/share
|
||||||
sudo mv jdk-16 /usr/share
|
sudo mv jdk-16 /usr/share
|
||||||
|
# On l'ajoute à la path pour Bash et Fish
|
||||||
export PATH=/usr/share/jdk-16/bin:$PATH
|
export PATH=/usr/share/jdk-16/bin:$PATH
|
||||||
if [ -x /usr/bin/fish ] ; then
|
if [ -x /usr/bin/fish ] ; then
|
||||||
fish -c 'fish_add_path /usr/share/jdk-16/bin'
|
fish -c 'fish_add_path /usr/share/jdk-16/bin'
|
||||||
|
|
Reference in a new issue