Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
google
GitHub Repository: google/crosvm
Path: blob/main/infra/cipd/package_rustup-init.sh
5394 views
1
#!/usr/bin/env bash
2
# Copyright 2022 The ChromiumOS Authors
3
# Use of this source code is governed by a BSD-style license that can be
4
# found in the LICENSE file.
5
6
set -ex
7
8
BUILD_DIR=$(mktemp -d)
9
cd "$BUILD_DIR" || exit 1
10
11
CIPD_ARGS=(
12
-pkg-var "description:rustup-init to set up rustup.rs"
13
-install-mode copy
14
-ref latest
15
)
16
17
RUSTUP_WIN="https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe"
18
RUSTUP_LINUX="https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init"
19
20
cd $(mktemp -d)
21
wget "$RUSTUP_WIN" -O "rustup-init.exe"
22
cipd create -in "." -name "crosvm/rustup-init/windows-amd64" "${CIPD_ARGS[@]}"
23
24
cd $(mktemp -d)
25
wget "$RUSTUP_LINUX" -O "rustup-init"
26
chmod +x "rustup-init"
27
cipd create -in "." -name "crosvm/rustup-init/linux-amd64" "${CIPD_ARGS[@]}"
28
29
30