diff options
Diffstat (limited to 'lib/util.bash')
-rw-r--r-- | lib/util.bash | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/util.bash b/lib/util.bash index 489ccf1..54ec562 100644 --- a/lib/util.bash +++ b/lib/util.bash @@ -112,9 +112,10 @@ fetch_http_wget() { # template, they are expected to be written as ${key}. file_template() { - local file="$(playbook_path "base")/share/$1" ; shift + local file local sedfile + file="$(playbook_path "base")/share/$1" ; shift sedfile="$(tmpfile)" if [[ ! -f $file ]] @@ -192,8 +193,8 @@ playbook_path() { fi case "$1" in - base) printf "$BASHTARD_ETCDIR/playbooks.d/$BASHTARD_PLAYBOOK" ;; - data) printf "$BASHTARD_ETCDIR/data.d/$BASHTARD_PLAYBOOK" ;; + base) printf "%s/playbooks.d/%s" "$BASHTARD_ETCDIR" "$BASHTARD_PLAYBOOK" ;; + data) printf "%s/data.d/%s" "$BASHTARD_ETCDIR" "$BASHTARD_PLAYBOOK" ;; *) crit "bashtard/playbook_path" "Invalid path '$1'" return 1 |