18 lines
732 B
Bash
18 lines
732 B
Bash
# On récupère la dernière version d'Obsidian
|
|
wget -q https://api.github.com/repos/ibmruntimes/semeru16-binaries/releases
|
|
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
|
|
rm releases
|
|
# On télécharge le paquet
|
|
wget -q --show-progress -i url -O java.tar.gz
|
|
rm url
|
|
tar xvzf java.tar.gz
|
|
rm java.tar.gz
|
|
mv jdk* jdk-16
|
|
sudo mv jdk-16 /usr/share
|
|
export PATH=/usr/share/jdk-16/bin:$PATH
|
|
if [ -x /usr/bin/fish ] ; then
|
|
fish -c 'fish_add_path /usr/share/jdk-16/bin'
|
|
fi
|
|
echo ""
|
|
echo "AdoptOpenJDK 16 is now installed at /usr/share/jdk-16"
|