From 483da09e60bf9636a082954d4346ccc19fc08539 Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Tue, 13 May 2014 16:21:15 +0300 Subject: [PATCH] bashrc: Fix #26 . I replaced bashrc version of fix-node with "which fix-node" output from zsh. --- bashrc | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/bashrc b/bashrc index db7bdeb3..dc8c89df 100644 --- a/bashrc +++ b/bashrc @@ -732,26 +732,24 @@ echo "I have now finished everything that I was supposed to do." # This function fixes nodejs on Debian based systems. # (Everything expects nodejs to be called as node, but it's not with Debian.) -function fix-node { - -if [[ $USER = "root" && -f /usr/bin/nodejs && ! -f /usr/bin/node && ! -f /usr/local/bin/node ]] then; - ln -s /usr/bin/nodejs /usr/local/bin/node -fi - -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; - ln -s /usr/bin/nodejs $HOME/.local/bin/node -fi - +fix-node () { + if [[ $USER = "root" && -f /usr/bin/nodejs && ! -f /usr/bin/node && ! -f /usr/local/bin/node ]] + then + ln -s /usr/bin/nodejs /usr/local/bin/node + fi + 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 + ln -s /usr/bin/nodejs $HOME/.local/bin/node + fi } # .custom if [ -f ~/.custom ]; then source ~/.custom - fi +fi # .bash_custom if [ -f ~/.bash_custom ]; then source ~/.bash_custom - fi +fi