File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -288,6 +288,7 @@ VAL_OPTIONS=""
288
288
flag uninstall " only uninstall from the installation prefix"
289
289
valopt prefix " " " set installation prefix"
290
290
valopt date " " " use the YYYY-MM-DD nightly instead of the current nightly"
291
+ valopt channel " nightly" " use the selected release channel [nightly]"
291
292
flag save " save the downloaded nightlies to ~/.rustup"
292
293
293
294
if [ $HELP -eq 1 ]
@@ -449,18 +450,25 @@ then
449
450
fi
450
451
451
452
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
+
453
467
RUST_PACKAGE_NAME_AND_TRIPLE=" ${RUST_PACKAGE_NAME} -${HOST_TRIPLE} "
454
468
RUST_TARBALL_NAME=" ${RUST_PACKAGE_NAME_AND_TRIPLE} .tar.gz"
455
469
RUST_LOCAL_INSTALL_DIR=" ${CFG_TMP_DIR} /${RUST_PACKAGE_NAME_AND_TRIPLE} "
456
470
RUST_LOCAL_INSTALL_SCRIPT=" ${RUST_LOCAL_INSTALL_DIR} /install.sh"
457
471
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
-
464
472
download_hash () {
465
473
msg " Downloading ${remote_sha256} "
466
474
remote_sha256=` " ${CFG_CURL} " -f " ${remote_sha256} " `
You can’t perform that action at this time.
0 commit comments