tsloughter / erlup

Erlang toolchain installer
14 stars 2 forks source link

Support creating a environment file sourced in ~/.profile #24

Open tsloughter opened 3 years ago

tsloughter commented 3 years ago

For example rustup will append . "$HOME/.cargo/env" to ~/.profile, the env file containing:

#!/bin/sh
# rustup shell setup
# affix colons on either side of $PATH to simplify matching
case ":${PATH}:" in
    *:"$HOME/.cargo/bin":*)
        ;;
    *)
        # Prepending path in case a system-installed rustc needs to be overridden
        export PATH="$HOME/.cargo/bin:$PATH"
        ;;
esac