From fb78ca8b763e57c83d9269a97b9f374aeed7d0b2 Mon Sep 17 00:00:00 2001 From: Richo Healey Date: Sat, 28 Mar 2015 19:50:26 -0700 Subject: [PATCH 1/4] rustup: Fix comment about Darwin's uname -m --- src/etc/rustup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etc/rustup.sh b/src/etc/rustup.sh index d4f1071c724b6..9218f2549e1b3 100755 --- a/src/etc/rustup.sh +++ b/src/etc/rustup.sh @@ -307,7 +307,7 @@ CFG_CPUTYPE=$(uname -m) if [ $CFG_OSTYPE = Darwin -a $CFG_CPUTYPE = i386 ] then - # Darwin's `uname -s` lies and always returns i386. We have to use sysctl + # Darwin's `uname -m` lies and always returns i386. We have to use sysctl # instead. if sysctl hw.optional.x86_64 | grep -q ': 1' then From ee3dffac4939c24d8c6412dc12dc1bd388494f40 Mon Sep 17 00:00:00 2001 From: Richo Healey Date: Sat, 28 Mar 2015 19:56:17 -0700 Subject: [PATCH 2/4] Add support for channel selection --- src/etc/rustup.sh | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/etc/rustup.sh b/src/etc/rustup.sh index 9218f2549e1b3..df00ff97510cc 100755 --- a/src/etc/rustup.sh +++ b/src/etc/rustup.sh @@ -288,6 +288,7 @@ VAL_OPTIONS="" flag uninstall "only uninstall from the installation prefix" valopt prefix "" "set installation prefix" valopt date "" "use the YYYY-MM-DD nightly instead of the current nightly" +valopt channel "nightly" "use the selected release channel [nightly]" flag save "save the downloaded nightlies to ~/.rustup" if [ $HELP -eq 1 ] @@ -449,18 +450,25 @@ then fi RUST_URL="https://static.rust-lang.org/dist" -RUST_PACKAGE_NAME=rust-nightly +case "$CFG_CHANNEL" in + nightly) + # add a date suffix if we want a particular nighly. + if [ -n "${CFG_DATE}" ]; + then + RUST_URL="${RUST_URL}/${CFG_DATE}" + fi + + RUST_PACKAGE_NAME=rust-nightly + ;; + *) + err "Currently nightly is the only supported release channel" +esac + RUST_PACKAGE_NAME_AND_TRIPLE="${RUST_PACKAGE_NAME}-${HOST_TRIPLE}" RUST_TARBALL_NAME="${RUST_PACKAGE_NAME_AND_TRIPLE}.tar.gz" RUST_LOCAL_INSTALL_DIR="${CFG_TMP_DIR}/${RUST_PACKAGE_NAME_AND_TRIPLE}" RUST_LOCAL_INSTALL_SCRIPT="${RUST_LOCAL_INSTALL_DIR}/install.sh" -# add a date suffix if we want a particular nighly. -if [ -n "${CFG_DATE}" ]; -then - RUST_URL="${RUST_URL}/${CFG_DATE}" -fi - download_hash() { msg "Downloading ${remote_sha256}" remote_sha256=`"${CFG_CURL}" -f "${remote_sha256}"` From 63f3d7f0fa75df43529c49e16c493967e1d7c9ab Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 1 Apr 2015 10:42:06 -0700 Subject: [PATCH 3/4] rustup: Default to the beta channel Switches rustup to using the beta channel by default --- src/etc/rustup.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/etc/rustup.sh b/src/etc/rustup.sh index 0ae7a238973c4..884605eb8cb20 100755 --- a/src/etc/rustup.sh +++ b/src/etc/rustup.sh @@ -288,7 +288,7 @@ VAL_OPTIONS="" flag uninstall "only uninstall from the installation prefix" valopt prefix "" "set installation prefix" valopt date "" "use the YYYY-MM-DD nightly instead of the current nightly" -valopt channel "nightly" "use the selected release channel [nightly]" +valopt channel "beta" "use the selected release channel [beta]" flag save "save the downloaded nightlies to ~/.rustup" if [ $HELP -eq 1 ] @@ -460,8 +460,11 @@ case "$CFG_CHANNEL" in RUST_PACKAGE_NAME=rust-nightly ;; + beta) + RUST_PACKAGE_NAME=rust-1.0.0-beta + ;; *) - err "Currently nightly is the only supported release channel" + err "Currently 'beta' and 'nightly' are the only supported channels" esac RUST_PACKAGE_NAME_AND_TRIPLE="${RUST_PACKAGE_NAME}-${HOST_TRIPLE}" From 971c355bad8eef31bca935ecf02fbc4605618213 Mon Sep 17 00:00:00 2001 From: Richo Healey Date: Wed, 1 Apr 2015 11:52:45 -0700 Subject: [PATCH 4/4] rustup: Fix typo in nightly --- src/etc/rustup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etc/rustup.sh b/src/etc/rustup.sh index 884605eb8cb20..918c0c66f76df 100755 --- a/src/etc/rustup.sh +++ b/src/etc/rustup.sh @@ -452,7 +452,7 @@ fi RUST_URL="https://static.rust-lang.org/dist" case "$CFG_CHANNEL" in nightly) - # add a date suffix if we want a particular nighly. + # add a date suffix if we want a particular nightly. if [ -n "${CFG_DATE}" ]; then RUST_URL="${RUST_URL}/${CFG_DATE}"