Søren Gjesse | 96b3725 | 2021-08-09 16:08:05 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Copyright (c) 2021, the R8 project authors. Please see the AUTHORS file |
| 4 | # for details. All rights reserved. Use of this source code is governed by a |
| 5 | # BSD-style license that can be found in the LICENSE file. |
| 6 | |
| 7 | set -e |
| 8 | set -x |
| 9 | |
| 10 | echo "Update this script manually before using" |
| 11 | exit -1 |
| 12 | |
| 13 | # Download JDK from https://jdk.java.net/X/ (X = version) into ~/Downloads |
| 14 | # Create directory third_party/openjdk/jdk-X |
| 15 | # cd into third_party/openjdk/jdk-X |
| 16 | # Prepare README.google |
| 17 | # Update JDK_VERSION below |
| 18 | |
Søren Gjesse | 2b19a03 | 2021-11-12 10:45:04 +0100 | [diff] [blame] | 19 | # Now run script with fingers crossed! |
Søren Gjesse | 96b3725 | 2021-08-09 16:08:05 +0200 | [diff] [blame] | 20 | |
Søren Gjesse | 2b19a03 | 2021-11-12 10:45:04 +0100 | [diff] [blame] | 21 | JDK_VERSION=17 |
Søren Gjesse | 96b3725 | 2021-08-09 16:08:05 +0200 | [diff] [blame] | 22 | |
| 23 | tar xf ~/Downloads/openjdk-${JDK_VERSION}_linux-x64_bin.tar.gz |
| 24 | cp -rL jdk-${JDK_VERSION} linux |
| 25 | cp README.google linux |
| 26 | upload_to_google_storage.py -a --bucket r8-deps linux |
| 27 | rm -rf jdk-${JDK_VERSION} |
| 28 | rm -rf linux |
| 29 | rm linux.tar.gz |
| 30 | |
Søren Gjesse | 2b19a03 | 2021-11-12 10:45:04 +0100 | [diff] [blame] | 31 | tar xf ~/Downloads/openjdk-${JDK_VERSION}_macos-x64_bin.tar.gz |
Søren Gjesse | 96b3725 | 2021-08-09 16:08:05 +0200 | [diff] [blame] | 32 | cp -rL jdk-${JDK_VERSION}.jdk osx |
| 33 | cp README.google osx |
| 34 | upload_to_google_storage.py -a --bucket r8-deps osx |
| 35 | rm -rf osx |
| 36 | rm -rf jdk-${JDK_VERSION}.jdk |
| 37 | rm osx.tar.gz |
| 38 | |
| 39 | unzip ~/Downloads/openjdk-${JDK_VERSION}_windows-x64_bin.zip |
| 40 | cp -rL jdk-${JDK_VERSION} windows |
| 41 | cp README.google windows |
| 42 | upload_to_google_storage.py -a --bucket r8-deps windows |
| 43 | rm -rf windows |
| 44 | rm -rf jdk-${JDK_VERSION} |
| 45 | rm windows.tar.gz |
Søren Gjesse | 2b19a03 | 2021-11-12 10:45:04 +0100 | [diff] [blame] | 46 | |
| 47 | git add *.sha1 |
| 48 | |
| 49 | echo "Update additional files, see https://r8-review.googlesource.com/c/r8/+/61909" |