Scripts for bootstrapping various programming languages
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.6 KiB

# NOTE: All of these commands rely on a same-version sdk not previously being installed
sudo rsync -rvP build/install-icedtea8/ /opt/icedtea8
sudo mkdir -p /usr/share/java-config-2/vm
cat << 'EOF' | sudo tee /usr/share/java-config-2/vm/openjdk-bin-8 > /dev/null
JAVA_HOME=/opt/icedtea8
PATH="${JAVA_HOME}/bin"
LDPATH=''
PROVIDES_TYPE='JDK JRE'
PROVIDES_VERSION=1.8
GENERATION=2
EOF
sudo mkdir -p /var/db/pkg/dev-java/openjdk-bin-8
echo 8 | sudo tee /var/db/pkg/dev-java/openjdk-bin-8/SLOT > /dev/null
sudo emerge dev-java/openjdk:8
sudo rm -rf /opt/icedtea8 /usr/share/java-config-2/vm/openjdk-bin-8 /var/db/pkg/dev-java/openjdk-bin-8
sudo rsync -rvP build/install-jdk11/ /opt/jdk11
sudo mkdir -p /var/db/pkg/dev-java/openjdk-bin-11
echo 11 | sudo tee /var/db/pkg/dev-java/openjdk-bin-11/SLOT > /dev/null
sudo JAVA_HOME="$(echo /opt/jdk11/jvm/*/)" emerge dev-java/openjdk:11
sudo rm -rf /opt/jdk11 /var/db/pkg/dev-java/openjdk-bin-11
sudo rsync -rvP build/install-jdk17/ /opt/jdk17
sudo mkdir -p /var/db/pkg/dev-java/openjdk-bin-17
echo 17 | sudo tee /var/db/pkg/dev-java/openjdk-bin-17/SLOT > /dev/null
sudo ln -s /opt/jdk17/jvm/*/ /opt/openjdk-bin-17
sudo emerge dev-java/openjdk:17
sudo rm -rf /opt/jdk17 /opt/openjdk-bin-17 /var/db/pkg/dev-java/openjdk-bin-17
sudo rsync -rvP build/install-jdk21/ /opt/jdk21
sudo mkdir -p /var/db/pkg/dev-java/openjdk-bin-21
echo 21 | sudo tee /var/db/pkg/dev-java/openjdk-bin-21/SLOT > /dev/null
sudo ln -s /opt/jdk21/jvm/*/ /opt/openjdk-bin-21
sudo emerge dev-java/openjdk:21
sudo rm -rf /opt/jdk21 /opt/openjdk-bin-21 /var/db/pkg/dev-java/openjdk-bin-21