@cryptotaxi247 / netdata-1 / commits / a0dcbfc51

--dev option to installer (#19034)

added --dev option to netdata-installer.sh to prevent it from removing the build directory

Costa Tsaousis committed Nov 19, 2024 at 01:15 UTC a0dcbfc5173d0706cca4727fda977980b5f39f1e
1 file changed +6 -1
netdata-installer.sh
+6 -1
@@ -237,6 +237,7 @@ USAGE: ${PROGRAM} [options]
237 have a broken pkg-config. Use this option to proceed without checking pkg-config.
238 --disable-telemetry Opt-out from our anonymous telemetry program. (DISABLE_TELEMETRY=1)
239 --skip-available-ram-check Skip checking the amount of RAM the system has and pretend it has enough to build safely.
240 + --dev Do not remove the build directory - speeds up rebuilds
241 HEREDOC
242 }
243
@@ -258,6 +259,7 @@ ENABLE_CHARTS=1
259 ENABLE_H2O=1
260 FORCE_LEGACY_CXX=0
261 NETDATA_CMAKE_OPTIONS="${NETDATA_CMAKE_OPTIONS-}"
262 +REMOVE_BUILD=1
263
264 RELEASE_CHANNEL="nightly" # valid values are 'nightly' and 'stable'
265 IS_NETDATA_STATIC_BINARY="${IS_NETDATA_STATIC_BINARY:-"no"}"
@@ -347,6 +349,9 @@ while [ -n "${1}" ]; do
349 NETDATA_PREPARE_ONLY=1
350 DONOTWAIT=1
351 ;;
352 + "--dev")
353 + REMOVE_BUILD=0
354 + ;;
355 "--help" | "-h")
356 usage
357 exit 1
@@ -573,7 +578,7 @@ echo >&2
578
579 [ -n "${GITHUB_ACTIONS}" ] && echo "::group::Configuring Netdata."
580 NETDATA_BUILD_DIR="${NETDATA_BUILD_DIR:-./build/}"
576 -rm -rf "${NETDATA_BUILD_DIR}"
581 +[ ${REMOVE_BUILD} -eq 1 ] && rm -rf "${NETDATA_BUILD_DIR}"
582
583 # function to extract values from the config file
584 config_option() {