Permalink
Browse files

Fixed issue of templates install with variables from

  • Loading branch information...
1 parent cf311e1 commit 6d782645e94fb3f67650c971ec8b7a3bde22a420 @lnguyen lnguyen committed May 9, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 core/internal/shell/templates/functions
@@ -85,19 +85,20 @@ __sm.templates.install()
(( _append == 0 )) || _params+=(--append)
+ _data_string+=""
+
if [[ -n "${_variable}" ]]
then eval "
for (( _index=1 ; _index <= \${#${_variable}} ; _index = _index + 2 ))
- do _params+=( --data \"\${${_variable}[\${_index}]}=\${${_variable}[\$((_index+1))]}\" )
+ do _data_string+=\"\${${_variable}[\${_index}]}=\${${_variable}[\$((_index+1))]}:~\"
done"
fi
- _data_string+="--data \""
for (( _index=1 ; _index <= ${#_data} ; _index = _index + 2 ))
do _data_string+="${_data[${_index}]}=${_data[$((_index+1))]}:~"
done
- _params+=(" ${_data_string}\"" )
+ _params+=( --data "${_data_string}\"" )
if ! "${sm_path}/bin/sm-mustache" "${_params[@]}"
then log error "There was an error rendering the template!"

0 comments on commit 6d78264

Please sign in to comment.