Skip to content
This repository was archived by the owner on Sep 30, 2020. It is now read-only.

Commit 5850d1f

Browse files
committed
Added a prefix option
1 parent ef1291a commit 5850d1f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

rustup.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ BOOL_OPTIONS=""
254254
VAL_OPTIONS=""
255255

256256
flag uninstall "only uninstall from the installation prefix"
257+
valopt prefix /usr/local "set installation prefix"
257258
opt cargo 1 "install cargo with rust"
258259

259260
if [ $HELP -eq 1 ]
@@ -441,7 +442,13 @@ then
441442
MAYBE_UNINSTALL="--uninstall"
442443
fi
443444

444-
sh "${LOCAL_INSTALL_SCRIPT}" "${MAYBE_UNINSTALL}"
445+
MAYBE_PREFIX=
446+
if [ -n "${CFG_PREFIX}" ]
447+
then
448+
MAYBE_PREFIX="--prefix=${CFG_PREFIX}"
449+
fi
450+
451+
sh "${LOCAL_INSTALL_SCRIPT}" "${MAYBE_UNINSTALL}" "${MAYBE_PREFIX}"
445452
if [ $? -ne 0 ]
446453
then
447454
rm -Rf "${TMP_DIR}"

0 commit comments

Comments
 (0)