[shtpl] Bug corrections
This commit is contained in:
parent
d0bf795dc7
commit
a1b92ff78a
|
@ -79,7 +79,7 @@ param()
|
|||
# debug name value
|
||||
params[$name]="${value:-true}"
|
||||
case "$name" in
|
||||
h|help) need_help=true; params[h]="${value:-true}"; params[help]="${value:-true}" ;;
|
||||
h|help) need_help=true; params[h]="${value:-true}"; params[help]="${value:-true}" ;;
|
||||
v|verbose) _verbose=true; params[v]="${value:-true}"; params[verbose]="${value:-true}" ;;
|
||||
p|pipable) isPipable=true; params[p]="${value:-true}"; params[pipable]="${value:-true}" ;;
|
||||
esac
|
||||
|
@ -116,7 +116,7 @@ debug args opts mandatories envs params file need_help _verbose isPipable
|
|||
|
||||
__shtpl_path__=$(realpath $0)
|
||||
__shtpl_dir__=$(dirname $0)
|
||||
__tpl_path__=$(realpath $1)
|
||||
__tpl_path__=$(realpath $file)
|
||||
__tpl_name__=$(basename $__tpl_path__)
|
||||
__tpl_dir__=$(dirname $__tpl_path__)
|
||||
|
||||
|
@ -148,11 +148,9 @@ slug()
|
|||
|
||||
# Execution
|
||||
|
||||
eval "echo \"$(cat $1 | sed '
|
||||
eval "echo \"$(cat $file | sed '
|
||||
# Suppress hashbang
|
||||
1{ /#\!.*shtpl.*/ d }
|
||||
# Excape quotes
|
||||
s/"/\\"/g
|
||||
')\""
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue