File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -55,17 +55,19 @@ php_band_parse_version() {
5555# utilities
5656php_band_apply_shell_expansion () {
5757 declare data=$1
58+ declare PHP_BAND_DOLLAR=' $'
5859 declare delimiter=" __apply_shell_expansion_delimiter__"
5960 declare command=" cat <<$delimiter " $' \n ' " $data " $' \n ' " $delimiter "
6061 eval " $command "
6162}
6263
63- # Subst {{varname}} with ${varname}}
64+ # Subst {{varname}} with ${varname}
6465# If no variable with that name exists, the placeholder is substed with empty string
6566php_band_substitute () {
6667 local filename=" $1 "
6768 local v
68- v=$( sed -r -e " s/\{\{([^\}]+)\}\}/\$ {\1}/g" " $filename " )
69+ sed -r -i -e " s/\\\$ /\$ {PHP_BAND_DOLLAR}/g" " ${filename} "
70+ v=$( sed -r -e " s/\{\{([^\}]+)\}\}/\$ {\1:-}/g" " ${filename} " )
6971 v=$( php_band_apply_shell_expansion " $v " )
7072 echo " $v " > " $filename "
7173}
You can’t perform that action at this time.
0 commit comments