#!/bin/bash # Copyright (C) 2019 Ian Kelling # SPDX-License-Identifier: AGPL-3.0-or-later # alternatively, using https://iankelling.org/git/?p=errhandle;a=tree # source /path/errhandle/err # on my machine source /a/bin/errhandle/err source /a/bin/distro-functions/src/package-manager-abstractions PATH="$PATH:$HOME/.cargo/bin" hash -r # todo: this should happen in some kind of sandbox or vm # install rust. if type -t rustc &>/dev/null; then rustup update else curl https://sh.rustup.rs -sSf | bash -s -- -y fi if ! which rg &>/dev/null; then cargo install ripgrep fi if ! type -t cargo-install-update &>/dev/null; then # due to # error: failed to run custom build command for `openssl-sys v0.9.53` pi libssl-dev pkg-config cargo install cargo-update fi cargo install-update -a