From 34ce5be006e6eb034c8de408e82dec8739cb48ea Mon Sep 17 00:00:00 2001 From: Matt Olenik Date: Wed, 20 Nov 2019 13:25:31 -0800 Subject: [PATCH] Respect SKIP_GIT environment variable when building Fixes issue #190 --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 123cd17..7efb23e 100755 --- a/build.sh +++ b/build.sh @@ -111,12 +111,12 @@ SRC_ORG="${SRC_ORG-netbox-community}" SRC_REPO="${SRC_REPO-netbox}" BRANCH="${1}" URL="${URL-https://github.com/${SRC_ORG}/${SRC_REPO}.git}" +NETBOX_PATH="${NETBOX_PATH-.netbox}" ### # fetching the source ### -if [ "${2}" != "--push-only" ] ; then - NETBOX_PATH="${NETBOX_PATH-.netbox}" +if [ "${2}" != "--push-only" ] && [ -z "${SKIP_GIT}" ] ; then echo "🌐 Checking out '${BRANCH}' of netbox from the url '${URL}' into '${NETBOX_PATH}'" if [ ! -d "${NETBOX_PATH}" ]; then $DRY git clone -q --depth 10 -b "${BRANCH}" "${URL}" "${NETBOX_PATH}"