Skip to content

Commit 1ca4f32

Browse files
committed
---
yaml --- r: 166755 b: refs/heads/master c: 8f827d3 h: refs/heads/master i: 166753: 1647cea 166751: d8294d2 v: v3
1 parent b9b8409 commit 1ca4f32

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: cb501535b38ac40fc3d93aaee13d76eecd4fa6c9
2+
refs/heads/master: 8f827d33cab1be648120fc8ac34651d9cc079b5e
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 023dfb0c898d851dee6ace2f8339b73b5287136b
55
refs/heads/try: f5d619caf9f32458680fae55526b99582ca682dd

trunk/src/etc/rustup.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff 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+
232244
probe_need CFG_CURL curl
233245

234246
CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/"
@@ -392,7 +404,7 @@ PACKAGE_NAME=rust-nightly
392404
PACKAGE_NAME_AND_TRIPLE="${PACKAGE_NAME}-${HOST_TRIPLE}"
393405
TARBALL_NAME="${PACKAGE_NAME_AND_TRIPLE}.tar.gz"
394406
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)
396408
LOCAL_TARBALL="${TMP_DIR}/${TARBALL_NAME}"
397409
LOCAL_INSTALL_DIR="${TMP_DIR}/${PACKAGE_NAME_AND_TRIPLE}"
398410
LOCAL_INSTALL_SCRIPT="${LOCAL_INSTALL_DIR}/install.sh"

0 commit comments

Comments
 (0)