mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-12-22 18:52:45 +01:00
{bash,zsh}rc: add support for linuxbrew
This commit is contained in:
parent
f9fefeeba7
commit
21e36c11ba
@ -313,6 +313,12 @@ if [ -d ~/.nodenv/bin ]; then
|
||||
# git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build
|
||||
fi
|
||||
|
||||
# https://github.com/Homebrew/brew
|
||||
if [ -d /home/linuxbrew/.linuxbrew/bin ]; then
|
||||
PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"
|
||||
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
|
||||
fi
|
||||
|
||||
# Removes duplicates from $PATH. Copied from https://unix.stackexchange.com/a/14896
|
||||
PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}')
|
||||
|
||||
|
6
rc/zshrc
6
rc/zshrc
@ -267,6 +267,12 @@ if [ -d ~/.nodenv/bin ]; then
|
||||
# git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build
|
||||
fi
|
||||
|
||||
# https://github.com/Homebrew/brew
|
||||
if [ -d /home/linuxbrew/.linuxbrew/bin ]; then
|
||||
PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"
|
||||
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
|
||||
fi
|
||||
|
||||
# Removes duplicates from $PATH. Copied from https://unix.stackexchange.com/a/14896
|
||||
PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++{if (NR > 1) printf ORS; printf $a[$1]}')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user