-
Notifications
You must be signed in to change notification settings - Fork 780
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify
truffleruby+graalvm-dev
build definition re: download redi…
…rect The `http get <url> <destfile>` utility had a bug with aria2c downloader where it couldn't properly save to destfile if it was an absolute path. I have tried having `http get <url> -` output the downloaded file to stdout, but this conflicted with the output of `log_command` (which is also to stdout) so for now let's keep using the temporary file to resolve manual URL redirects.
- Loading branch information
Showing
2 changed files
with
17 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
platform="$(uname -s)-$(uname -m)" | ||
case $platform in | ||
Linux-x86_64) | ||
url="https://raw.githubusercontent.com/graalvm/graal-languages-ea-builds/main/truffleruby/versions/latest-jvm-linux-amd64.url" | ||
url="https://github.com/graalvm/graal-languages-ea-builds/raw/HEAD/truffleruby/versions/latest-jvm-linux-amd64.url" | ||
;; | ||
Linux-aarch64) | ||
url="https://raw.githubusercontent.com/graalvm/graal-languages-ea-builds/main/truffleruby/versions/latest-jvm-linux-aarch64.url" | ||
url="https://github.com/graalvm/graal-languages-ea-builds/raw/HEAD/truffleruby/versions/latest-jvm-linux-aarch64.url" | ||
;; | ||
Darwin-x86_64) | ||
url="https://raw.githubusercontent.com/graalvm/graal-languages-ea-builds/main/truffleruby/versions/latest-jvm-darwin-amd64.url" | ||
url="https://github.com/graalvm/graal-languages-ea-builds/raw/HEAD/truffleruby/versions/latest-jvm-darwin-amd64.url" | ||
;; | ||
Darwin-arm64) | ||
url="https://raw.githubusercontent.com/graalvm/graal-languages-ea-builds/main/truffleruby/versions/latest-jvm-darwin-aarch64.url" | ||
url="https://github.com/graalvm/graal-languages-ea-builds/raw/HEAD/truffleruby/versions/latest-jvm-darwin-aarch64.url" | ||
;; | ||
*) | ||
colorize 1 "Unsupported platform: $platform" | ||
return 1 | ||
;; | ||
esac | ||
|
||
pushd "$BUILD_PATH" >/dev/null | ||
http get $url url.txt | ||
url=$(<url.txt) | ||
popd | ||
|
||
install_package "truffleruby+graalvm-dev" "$url" truffleruby | ||
urlfile="$(mktemp "${TMP}/truffleruby.XXXXXX")" | ||
http get "$url" "$urlfile" | ||
install_package "truffleruby+graalvm-dev" "$(<"$urlfile")" truffleruby | ||
rm -f "$urlfile" |