Root
This commit is contained in:
parent
7fb6d1ec6a
commit
3b4ee50084
10
install.sh
10
install.sh
|
|
@ -1,6 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
NVM_DIR="$HOME/.nvm"
|
if [ `whoami` == 'root' ]; then
|
||||||
|
NVM_DIR="/usr/local/nvm"
|
||||||
|
else
|
||||||
|
NVM_DIR="$HOME/.nvm"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d "$NVM_DIR" ]; then
|
if [ -d "$NVM_DIR" ]; then
|
||||||
echo "=> NVM is already installed in $NVM_DIR, trying to update"
|
echo "=> NVM is already installed in $NVM_DIR, trying to update"
|
||||||
|
|
@ -15,7 +19,9 @@ git clone https://github.com/creationix/nvm.git $NVM_DIR
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Detect profile file, .bash_profile has precedence over .profile
|
# Detect profile file, .bash_profile has precedence over .profile
|
||||||
if [ ! -z "$1" ]; then
|
if [ `whoami` == 'root' ]; then
|
||||||
|
PROFILE="/etc/bash.bashrc
|
||||||
|
elsif [ ! -z "$1" ]; then
|
||||||
PROFILE="$1"
|
PROFILE="$1"
|
||||||
else
|
else
|
||||||
if [ -f "$HOME/.bash_profile" ]; then
|
if [ -f "$HOME/.bash_profile" ]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue