diff --git a/bashrc b/bashrc index 1997858f..b33ac1e2 100644 --- a/bashrc +++ b/bashrc @@ -738,6 +738,21 @@ 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 + +} # .custom if [ -f ~/.custom ]; then diff --git a/zshrc b/zshrc index 0579062b..418a7373 100644 --- a/zshrc +++ b/zshrc @@ -710,6 +710,23 @@ 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 + +} + + # Source files for miscannellious modifications.