From f33cf06e621bebf20158d29a51dcd8ad6ca1539a Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 22 Oct 2014 09:59:10 +0200 Subject: controller: allow parsing credsfile from anywhere * controller/parse_credsfile: Detect $srcdir to be able to read the correct secret file from any CWD. --- controller/parse_credsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'controller') diff --git a/controller/parse_credsfile b/controller/parse_credsfile index df2a6bf..4cf8e58 100644 --- a/controller/parse_credsfile +++ b/controller/parse_credsfile @@ -1,4 +1,6 @@ -credsfile="private/os/$1.yml" +___os_confdir=$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P) + +credsfile="$___os_confdir/private/os/$1.yml" while read line; do if [[ "$line" =~ ^([a-zA-Z0-9_]*):\ ?(.*)$ ]]; then -- cgit