Add script for installing java
This commit is contained in:
parent
1b04fa46ab
commit
b5d3bbc081
2 changed files with 19 additions and 0 deletions
|
@ -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
18
scripts/PopOS/software/java.sh
Executable 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
|
Loading…
Reference in a new issue