blob: 7132eb4ce1b417028fa63af21cb05c7fac2da979 [file] [log] [blame]
#!/bin/bash -e
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apt-get install gnupg ca-certificates curl wget
curl -s https://repos.azul.com/azul-repo.key | sudo gpg --dearmor -o /usr/share/keyrings/azul.gpg
echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" | sudo tee /etc/apt/sources.list.d/zulu.list
apt-get update
apt-get install -y zulu8-jdk zulu11-jdk zulu17-jdk
# downgrade jdk8 to 1.8.0_262-b19 to avoid timestamp issue
wget -nv https://cdn.azul.com/zulu/bin/zulu8.48.0.51-ca-fx-jdk8.0.262-linux_x64.tar.gz
tar zxf zulu8.48.0.51-ca-fx-jdk8.0.262-linux_x64.tar.gz && rm zulu8.48.0.51-ca-fx-jdk8.0.262-linux_x64.tar.gz
rm -rf /usr/lib/jvm/zulu8-ca-amd64 && mv zulu8.48.0.51-ca-fx-jdk8.0.262-linux_x64 /usr/lib/jvm/zulu8-ca-amd64
update-java-alternatives --set zulu8-ca-amd64
/tools/build_cleanup