# On branch Development

# Your branch is ahead of 'origin/Development' by 1 commit.
#   (use "git push" to publish your local commits)
#
# Changes to be committed:
#   (use "git restore --staged <file>..." to unstage)
# 	modified:   install.bash
This commit is contained in:
Price Hiller 2022-07-30 22:46:09 -05:00
parent 0a9854e304
commit 3f8530dfb8

View File

@ -96,7 +96,7 @@ install-rust() {
export RUSTUP_HOME="${install_path}/rustup"
if ! [[ -e "${CARGO_HOME}" ]] || ! [[ -e "${RUSTUP_HOME}" ]]; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --quiet
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | ${RUSTUP_HOME} sh -s -- -y --quiet
else
log "info" "${GREEN}Rust${RESET_BOLD} already installed, skipping"
fi
@ -105,7 +105,9 @@ install-rust() {
if [[ -z "$(ls "${RUSTUP_HOME}/toolchains")" ]]; then
log "info" "No toolchain found, installing a ${GREEN}Rust${RESET_BOLD} toolchain"
log "info" "Setting ${GREEN}Rust{$RESET_BOLD}'s toolchain to ${GREEN}stable${RESET_BOLD}"
rustup default stable
(
printf "%s" "rustup default stable" | zsh
)
else
log "info" "${GREEN}Rust${RESET_BOLD} toolchain found, skipping toolchain setup"
fi
@ -175,6 +177,7 @@ deploy-config() {
}
main() {
local tasks_done=()
PKG_INSTALL_CMD="${*}"
if [[ -z "${PKG_INSTALL_CMD}" ]]; then
log "error" "A package installer must be passed to install missing packages, or ${GREEN}SKIP_PKG_INSTALL=TRUE${RESET_BOLD} must be set."
@ -199,6 +202,7 @@ main() {
exit 1
fi
log "info" "Successfully installed ${GREEN}FZF${RESET_BOLD}"
tasks_done+=("Install FZF")
print-break
log "info" "Installing Rust"
@ -207,6 +211,7 @@ main() {
exit 1
fi
log "info" "Successfully installed ${GREEN}Rust${RESET_BOLD}"
tasks_done+=("Install Rust")
print-break
log "info" "Installing Cargo programs"