diff --git a/setup-min.sh b/setup-min.sh index 8e3eebf..6ed3305 100644 --- a/setup-min.sh +++ b/setup-min.sh @@ -12,7 +12,15 @@ # curl -fsSL https://example.com/setup-min.bash | bash # wget -nv https://example.com/setup-min.bash -O - | bash -if [ -z "$NODE_PATH" ]; then +set -e +set -u +set -o pipefail + +if [ -z "${PREFIX-}" ]; then + PREFIX="" +fi + +if [ -n "$NODE_PATH" ]; then node_install_path=$(dirname $(dirname $NODE_PATH)) else node_install_path=$PREFIX/usr/local