Skip to content

Commit d0c8437

Browse files
committed
---
yaml --- r: 109455 b: refs/heads/dist-snap c: 2205c48 h: refs/heads/master i: 109453: 2c2178d 109451: 5f6f2a2 109447: a39197d 109439: e336a6d v: v3
1 parent 6f97fa1 commit d0c8437

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 01d823b4de9ecf7bf37e0e6433615592ac9b5565
9+
refs/heads/dist-snap: 2205c48ee4949521d1a1a416afdb7ad7777b4a65
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/etc/install.sh

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -234,16 +234,16 @@ validate_opt
234234
# Sanity check: can we run the binaries?
235235
if [ -z "${CFG_DISABLE_VERIFY}" ]
236236
then
237-
# Don't do this if uninstalling. Failure here won't help in any way.
238-
if [ -z "${CFG_UNINSTALL}" ]
239-
then
240-
msg "verifying platform can run binaries"
241-
"${CFG_SRC_DIR}/bin/rustc" --version > /dev/null
242-
if [ $? -ne 0 ]
243-
then
244-
err "can't execute rustc binary on this platform"
245-
fi
246-
fi
237+
# Don't do this if uninstalling. Failure here won't help in any way.
238+
if [ -z "${CFG_UNINSTALL}" ]
239+
then
240+
msg "verifying platform can run binaries"
241+
"${CFG_SRC_DIR}/bin/rustc" --version > /dev/null
242+
if [ $? -ne 0 ]
243+
then
244+
err "can't execute rustc binary on this platform"
245+
fi
246+
fi
247247
fi
248248

249249
# Sanity check: can we can write to the destination?
@@ -255,7 +255,7 @@ if [ $? -ne 0 ]
255255
then
256256
err "can't write to destination. consider \`sudo\`."
257257
fi
258-
rm "${CFG_LIBDIR}/rust-install-probe"
258+
rm -f "${CFG_LIBDIR}/rust-install-probe"
259259
need_ok "failed to remove install probe"
260260

261261
# Sanity check: don't install to the directory containing the installer.
@@ -281,7 +281,7 @@ then
281281
msg "removing $p"
282282
if [ -f "$p" ]
283283
then
284-
rm "$p"
284+
rm -f "$p"
285285
if [ $? -ne 0 ]
286286
then
287287
warn "failed to remove $p"
@@ -291,12 +291,16 @@ then
291291
fi
292292
done < "${INSTALLED_MANIFEST}"
293293

294-
# TODO: Remove the manifest.
295-
# If we fail to remove rustlib below, then the installed manifest will
296-
# still be full; the installed manifest needs to be empty before install.
294+
# If we fail to remove rustlib below, then the installed manifest will
295+
# still be full; the installed manifest needs to be empty before install.
296+
msg "removing ${CFG_LIBDIR}/rustlib/manifest"
297+
rm -f "${CFG_LIBDIR}/rustlib/manifest"
298+
# For the above reason, this is a hard error
299+
need_ok "failed to remove installed manifest"
297300

298301
# Remove 'rustlib' directory
299-
rm -r "${CFG_LIBDIR}/rustlib"
302+
msg "removing ${CFG_LIBDIR}/rustlib"
303+
rm -Rf "${CFG_LIBDIR}/rustlib"
300304
if [ $? -ne 0 ]
301305
then
302306
warn "failed to remove rustlib"

0 commit comments

Comments
 (0)