From 2e062bdf5542c1b8aede3bdbfdab124de98ebd6d Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Wed, 3 May 2017 14:40:13 -0400 Subject: [PATCH] Adding common bash reader --- vars/readCommonBash.groovy | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 vars/readCommonBash.groovy diff --git a/vars/readCommonBash.groovy b/vars/readCommonBash.groovy new file mode 100644 index 0000000..dff621c --- /dev/null +++ b/vars/readCommonBash.groovy @@ -0,0 +1,4 @@ +def call(String key = 'maintainer') { + def matcher = readFile('common.bash') =~ (key + '="(.+)"') + matcher ? matcher[0][1] : 'null' +} \ No newline at end of file