Add script for installing java

This commit is contained in:
Manuel Thalmann 2022-11-15 13:11:54 +01:00
parent 1b04fa46ab
commit b5d3bbc081
2 changed files with 19 additions and 0 deletions

View file

@ -40,6 +40,7 @@ source "$softwareRoot/oh-my-posh.sh"
source "$softwareRoot/logo-ls.sh"
source "$softwareRoot/codium.sh"
source "$softwareRoot/code.sh"
source "$softwareRoot/java.sh"
source "$softwareRoot/tea.sh"
# Install other flatpaks

18
scripts/PopOS/software/java.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
apt install -y wget apt-transport-https
mkdir -p /etc/apt/keyrings
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public \
| tee /etc/apt/keyrings/adoptium.asc
echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" \
| tee /etc/apt/sources.list.d/adoptium.list
apt update
apt install -y temurin-17-jdk
fi