diff --git a/setup-min.sh b/setup-min.sh index 6880c16..3f8b44f 100644 --- a/setup-min.sh +++ b/setup-min.sh @@ -12,6 +12,12 @@ # curl -fsSL https://example.com/setup-min.bash | 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_BASE_URL="https://nodejs.org" 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}" fi -sudo chown -R $(whoami):$(whoami) /usr/local/lib/node_modules +sudo chown -R $(whoami):$(whoami) $node_install_path/lib/node_modules echo "" \ No newline at end of file