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 () {
229
229
done
230
230
}
231
231
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
+
232
244
probe_need CFG_CURL curl
233
245
234
246
CFG_SRC_DIR=" $( cd $( dirname $0 ) && pwd) /"
@@ -392,7 +404,7 @@ PACKAGE_NAME=rust-nightly
392
404
PACKAGE_NAME_AND_TRIPLE=" ${PACKAGE_NAME} -${HOST_TRIPLE} "
393
405
TARBALL_NAME=" ${PACKAGE_NAME_AND_TRIPLE} .tar.gz"
394
406
REMOTE_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 )
396
408
LOCAL_TARBALL=" ${TMP_DIR} /${TARBALL_NAME} "
397
409
LOCAL_INSTALL_DIR=" ${TMP_DIR} /${PACKAGE_NAME_AND_TRIPLE} "
398
410
LOCAL_INSTALL_SCRIPT=" ${LOCAL_INSTALL_DIR} /install.sh"
You can’t perform that action at this time.
0 commit comments