using sdkman instead of manual installer
This commit is contained in:
parent
b4b00f2ad2
commit
b24770f37b
2 changed files with 7 additions and 25 deletions
|
@ -30,9 +30,6 @@ abbr spotify 'LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify > /dev/null 2
|
||||||
# Exclu fac
|
# Exclu fac
|
||||||
# abbr bocal 'ssh bocal -t sh'
|
# abbr bocal 'ssh bocal -t sh'
|
||||||
|
|
||||||
# SDKMAN
|
|
||||||
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
|
||||||
|
|
||||||
# GL4Dummies
|
# GL4Dummies
|
||||||
set -gx PATH $HOME/local/bin $PATH
|
set -gx PATH $HOME/local/bin $PATH
|
||||||
set -gx LD_LIBRARY_PATH $HOME/local/lib $LD_LIBRARY_PATH
|
set -gx LD_LIBRARY_PATH $HOME/local/lib $LD_LIBRARY_PATH
|
||||||
|
|
|
@ -1,23 +1,8 @@
|
||||||
# On récupère la dernière version d'AdoptOpenJDK-16
|
# Install SDKMAN
|
||||||
wget -q https://api.github.com/repos/ibmruntimes/semeru16-binaries/releases
|
curl -s "https://get.sdkman.io" | bash
|
||||||
echo "Retrieve the last package..."
|
# Adding Fish support if fish is installed (assumes that Fisher is already installed)
|
||||||
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
|
if [ -x $HOME/.config/fish ] ; then
|
||||||
rm releases
|
fish -c 'fisher install reitzig/sdkman-for-fish'
|
||||||
# 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
|
|
||||||
# On le place dans le dossier /usr/share
|
|
||||||
if [ -x /usr/share/jdk-16 ] ; then
|
|
||||||
sudo rm -rf /usr/share/jdk-16
|
|
||||||
fi
|
fi
|
||||||
sudo mv jdk-16 /usr/share
|
# Install Temurin build according with https://whichjdk.com/#adoptium-eclipse-temurin
|
||||||
# On l'ajoute à la path pour Bash et Fish
|
fish -c 'sdk install java 17.0.1-tem'
|
||||||
echo "export PATH=/usr/share/jdk-16/bin:\$PATH" >> $HOME/.bashrc
|
|
||||||
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"
|
|
||||||
|
|
Reference in a new issue