bashrc: Fix #26 .

I replaced bashrc version of fix-node with "which fix-node" output from zsh.
This commit is contained in:
Mikaela Suomalainen 2014-05-13 16:21:15 +03:00
parent 98e8b008c6
commit 483da09e60
1 changed files with 12 additions and 14 deletions

26
bashrc
View File

@ -732,26 +732,24 @@ echo "I have now finished everything that I was supposed to do."
# This function fixes nodejs on Debian based systems. # This function fixes nodejs on Debian based systems.
# (Everything expects nodejs to be called as node, but it's not with Debian.) # (Everything expects nodejs to be called as node, but it's not with Debian.)
function fix-node { fix-node () {
if [[ $USER = "root" && -f /usr/bin/nodejs && ! -f /usr/bin/node && ! -f /usr/local/bin/node ]]
if [[ $USER = "root" && -f /usr/bin/nodejs && ! -f /usr/bin/node && ! -f /usr/local/bin/node ]] then; then
ln -s /usr/bin/nodejs /usr/local/bin/node ln -s /usr/bin/nodejs /usr/local/bin/node
fi fi
mkdir -p $HOME/.local/bin
mkdir -p $HOME/.local/bin if [[ -f /usr/bin/nodejs && ! -f /usr/bin/node && ! -f /usr/local/bin/node && ! -f $HOME/.local/bin/node ]]
then
if [[ -f /usr/bin/nodejs && ! -f /usr/bin/node && ! -f /usr/local/bin/node && ! -f $HOME/.local/bin/node ]] then; ln -s /usr/bin/nodejs $HOME/.local/bin/node
ln -s /usr/bin/nodejs $HOME/.local/bin/node fi
fi
} }
# .custom # .custom
if [ -f ~/.custom ]; then if [ -f ~/.custom ]; then
source ~/.custom source ~/.custom
fi fi
# .bash_custom # .bash_custom
if [ -f ~/.bash_custom ]; then if [ -f ~/.bash_custom ]; then
source ~/.bash_custom source ~/.bash_custom
fi fi