[dpdk-ci] [PATCH 3/7] config: add loader and template
Thomas Monjalon
thomas.monjalon at 6wind.com
Fri Nov 25 18:02:10 CET 2016
The configuration file will allow to set some environment-specific
options and paths to be used by the scripts.
Signed-off-by: Thomas Monjalon <thomas.monjalon at 6wind.com>
---
config/ci.config | 4 ++++
tools/load-ci-config.sh | 14 ++++++++++++++
2 files changed, 18 insertions(+)
create mode 100644 config/ci.config
create mode 100644 tools/load-ci-config.sh
diff --git a/config/ci.config b/config/ci.config
new file mode 100644
index 0000000..2aeff04
--- /dev/null
+++ b/config/ci.config
@@ -0,0 +1,4 @@
+# Configuration template to be copied in
+# /etc/dpdk/ci.config
+# or ~/.config/dpdk/ci.config
+# or .ciconfig
diff --git a/tools/load-ci-config.sh b/tools/load-ci-config.sh
new file mode 100644
index 0000000..9ec18b4
--- /dev/null
+++ b/tools/load-ci-config.sh
@@ -0,0 +1,14 @@
+#! /bin/echo must be loaded with .
+
+# Load DPDK CI config and allow override
+# from system file
+test ! -r /etc/dpdk/ci.config ||
+ . /etc/dpdk/ci.config
+# from user file
+test ! -r ~/.config/dpdk/ci.config ||
+ . ~/.config/dpdk/ci.config
+# from local file
+test ! -r $(dirname $(readlink -m $0))/../.ciconfig ||
+ . $(dirname $(readlink -m $0))/../.ciconfig
+
+# The config files must export variables in the shell style
--
2.7.0
More information about the ci
mailing list