File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,18 @@ validate_opt () {
229229 done
230230}
231231
232+ create_tmp_dir () {
233+ local TMP_DIR=./rustup-tmp-install
234+
235+ rm -Rf " ${TMP_DIR} "
236+ need_ok " failed to remove temporary installation directory"
237+
238+ mkdir -p " ${TMP_DIR} "
239+ need_ok " failed to create create temporary installation directory"
240+
241+ echo $TMP_DIR
242+ }
243+
232244probe_need CFG_CURL curl
233245
234246CFG_SRC_DIR=" $( cd $( dirname $0 ) && pwd) /"
@@ -392,7 +404,7 @@ PACKAGE_NAME=rust-nightly
392404PACKAGE_NAME_AND_TRIPLE=" ${PACKAGE_NAME} -${HOST_TRIPLE} "
393405TARBALL_NAME=" ${PACKAGE_NAME_AND_TRIPLE} .tar.gz"
394406REMOTE_TARBALL=" https://static.rust-lang.org/dist/${TARBALL_NAME} "
395- TMP_DIR=` mktemp -d 2> /dev/null || mktemp -d -t ' mytmpdir' `
407+ TMP_DIR=` mktemp -d 2> /dev/null || mktemp -d -t ' mytmpdir' 2> /dev/null ` || TMP_DIR= $( create_tmp_dir )
396408LOCAL_TARBALL=" ${TMP_DIR} /${TARBALL_NAME} "
397409LOCAL_INSTALL_DIR=" ${TMP_DIR} /${PACKAGE_NAME_AND_TRIPLE} "
398410LOCAL_INSTALL_SCRIPT=" ${LOCAL_INSTALL_DIR} /install.sh"
You can’t perform that action at this time.
0 commit comments