Skip to content

Commit 3c95f05

Browse files
committed
---
yaml --- r: 196287 b: refs/heads/tmp c: ee3dffa h: refs/heads/master i: 196285: 4575bdb 196283: b8797ff 196279: 590c349 196271: af1f052 196255: ea5f628 196223: 6461628 v: v3
1 parent 38510df commit 3c95f05

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3232
refs/heads/beta: 9854143cba679834bc4ef932858cd5303f015a0e
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
35-
refs/heads/tmp: fb78ca8b763e57c83d9269a97b9f374aeed7d0b2
35+
refs/heads/tmp: ee3dffac4939c24d8c6412dc12dc1bd388494f40
3636
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3737
refs/tags/homu-tmp: 53a183f0274316596bf9405944d4f0468d8c93e4
3838
refs/heads/gate: 97c84447b65164731087ea82685580cc81424412

branches/tmp/src/etc/rustup.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ VAL_OPTIONS=""
288288
flag uninstall "only uninstall from the installation prefix"
289289
valopt prefix "" "set installation prefix"
290290
valopt date "" "use the YYYY-MM-DD nightly instead of the current nightly"
291+
valopt channel "nightly" "use the selected release channel [nightly]"
291292
flag save "save the downloaded nightlies to ~/.rustup"
292293

293294
if [ $HELP -eq 1 ]
@@ -449,18 +450,25 @@ then
449450
fi
450451

451452
RUST_URL="https://static.rust-lang.org/dist"
452-
RUST_PACKAGE_NAME=rust-nightly
453+
case "$CFG_CHANNEL" in
454+
nightly)
455+
# add a date suffix if we want a particular nighly.
456+
if [ -n "${CFG_DATE}" ];
457+
then
458+
RUST_URL="${RUST_URL}/${CFG_DATE}"
459+
fi
460+
461+
RUST_PACKAGE_NAME=rust-nightly
462+
;;
463+
*)
464+
err "Currently nightly is the only supported release channel"
465+
esac
466+
453467
RUST_PACKAGE_NAME_AND_TRIPLE="${RUST_PACKAGE_NAME}-${HOST_TRIPLE}"
454468
RUST_TARBALL_NAME="${RUST_PACKAGE_NAME_AND_TRIPLE}.tar.gz"
455469
RUST_LOCAL_INSTALL_DIR="${CFG_TMP_DIR}/${RUST_PACKAGE_NAME_AND_TRIPLE}"
456470
RUST_LOCAL_INSTALL_SCRIPT="${RUST_LOCAL_INSTALL_DIR}/install.sh"
457471

458-
# add a date suffix if we want a particular nighly.
459-
if [ -n "${CFG_DATE}" ];
460-
then
461-
RUST_URL="${RUST_URL}/${CFG_DATE}"
462-
fi
463-
464472
download_hash() {
465473
msg "Downloading ${remote_sha256}"
466474
remote_sha256=`"${CFG_CURL}" -f "${remote_sha256}"`

0 commit comments

Comments
 (0)