From b6c4f023f5ad80fa340f09720c491bba943bcdf8 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 15 May 2017 21:56:04 -0600 Subject: [PATCH] Update setup-min.sh --- setup-min.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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