use NODE_PATH for node_install_path
This commit is contained in:
parent
5b17c6e5fd
commit
2831949296
|
@ -12,6 +12,12 @@
|
||||||
# curl -fsSL https://example.com/setup-min.bash | bash
|
# curl -fsSL https://example.com/setup-min.bash | bash
|
||||||
# wget -nv https://example.com/setup-min.bash -O - | bash
|
# wget -nv https://example.com/setup-min.bash -O - | bash
|
||||||
|
|
||||||
|
if [ -z "$NODE_PATH" ]; then
|
||||||
|
node_install_path=$(dirname $(dirname $NODE_PATH))
|
||||||
|
else
|
||||||
|
node_install_path=$PREFIX/usr/local
|
||||||
|
fi
|
||||||
|
|
||||||
NODEJS_NAME="node"
|
NODEJS_NAME="node"
|
||||||
NODEJS_BASE_URL="https://nodejs.org"
|
NODEJS_BASE_URL="https://nodejs.org"
|
||||||
BASE_URL="https://git.daplie.com/coolaj86/node-install-script/raw/master"
|
BASE_URL="https://git.daplie.com/coolaj86/node-install-script/raw/master"
|
||||||
|
@ -233,6 +239,6 @@ if [ -n "${NODEJS_VER}" ]; then
|
||||||
bash "/tmp/${INSTALL_FILE}" "${NODEJS_VER}"
|
bash "/tmp/${INSTALL_FILE}" "${NODEJS_VER}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo chown -R $(whoami):$(whoami) /usr/local/lib/node_modules
|
sudo chown -R $(whoami):$(whoami) $node_install_path/lib/node_modules
|
||||||
|
|
||||||
echo ""
|
echo ""
|
Loading…
Reference in New Issue