mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-16 16:29:23 +01:00
bashrc & zshrc: add fix-node function. Closes #23 .
This commit is contained in:
parent
83ccf48080
commit
c5efaf17c7
15
bashrc
15
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
|
# .custom
|
||||||
if [ -f ~/.custom ]; then
|
if [ -f ~/.custom ]; then
|
||||||
|
17
zshrc
17
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.
|
# Source files for miscannellious modifications.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user