Browse Source

fixed NM_SKIP_BUILD

Tobias Cudnik 2 years ago
parent
commit
ad27418855
1 changed files with 7 additions and 7 deletions
  1. 7 7
      scripts/nm-quick.sh

+ 7 - 7
scripts/nm-quick.sh

@@ -11,6 +11,12 @@ if [ $(id -u) -ne 0 ]; then
 	exit 1
 fi
 
+# read the config file
+if [ -f "$CONFIG_PATH" ]; then
+	echo "Reading config from $CONFIG_PATH"
+	source "$CONFIG_PATH"
+fi
+
 unset INSTALL_TYPE
 unset BUILD_TYPE
 unset BUILD_TAG
@@ -262,7 +268,7 @@ local_install_setup() { (
 	cd netmaker-tmp
 	git clone --single-branch --depth=1 --branch=$BUILD_TAG https://www.github.com/gravitl/netmaker
 	cd netmaker
-	if ! $NM_SKIP_BUILD; then
+	if test -z "$NM_SKIP_BUILD"; then
 		docker build --no-cache --build-arg version=$IMAGE_TAG -t gravitl/netmaker:$IMAGE_TAG .
 	else
 		echo "Skipping build on NM_SKIP_BUILD"
@@ -475,12 +481,6 @@ set_install_vars() {
 		done
 	fi
 
-	# read the config file
-	if [ -f "$CONFIG_PATH" ]; then
-		echo "Reading config from $CONFIG_PATH"
-		source "$CONFIG_PATH"
-	fi
-
 	unset GET_EMAIL
 	unset RAND_EMAIL
 	RAND_EMAIL="$(echo $RANDOM | md5sum | head -c 16)@email.com"