From 02e5353a9fd5bba77162d6eff43c22917773da3d Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Tue, 14 Mar 2017 09:51:34 -0600 Subject: [PATCH] Allow ELEMENTS_DIR to be configurable Prior to version 2.0.0 of diskimage-builder, the elements dir was hard coded as 'elements' in dib-lint which allowed dib-lint to be consumed by other projects (instack-undercloud). The 2.0.0 release has changed this path and it is not overridable so that the other projects can still use dib-lint. This change makes ELEMENTS_DIR and LIB_DIR check for an existing environment variable so that dib-lint can be consumed outside of the diskimage-builder project. Change-Id: Iae1dade1e20a950e63ffe8dacfea0f23cf9923a0 Related-Bug: #1672730 --- bin/dib-lint | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/dib-lint b/bin/dib-lint index db6cbd91..c622e0e7 100755 --- a/bin/dib-lint +++ b/bin/dib-lint @@ -21,8 +21,8 @@ set -eu set -o pipefail -ELEMENTS_DIR=diskimage_builder/elements -LIB_DIR=diskimage_builder/lib +ELEMENTS_DIR=${ELEMENTS_DIR:-diskimage_builder/elements} +LIB_DIR=${LIB_DIR:-diskimage_builder/lib} parse_exclusions() { # Per-file exclusions