Skip to content

Commit 6b6305c

Browse files
committed
---
yaml --- r: 109530 b: refs/heads/snap-stage3 c: 2205c48 h: refs/heads/master v: v3
1 parent 212f54c commit 6b6305c

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
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: b8ef9fd9c9f642ce7b8aed82782a1ed745d08d64
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 01d823b4de9ecf7bf37e0e6433615592ac9b5565
4+
refs/heads/snap-stage3: 2205c48ee4949521d1a1a416afdb7ad7777b4a65
55
refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/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)