mirror of
https://github.com/kvz/bash3boilerplate.git
synced 2025-01-21 03:24:57 +00:00
Merge pull request #93 from gmasse/fix_templater
templater.sh: Update Regexp to not match ${_} for replacement
This commit is contained in:
commit
d25d6a0106
@ -15,9 +15,10 @@ Released: TBA.
|
||||
|
||||
- [ ] Upgrade to `lanyon@0.0.55`
|
||||
- [x] Fix typos in megamount (thanks @gsaponaro)
|
||||
- [x] Enable color in screen or tmux (#92, @gmasse)
|
||||
- [x] Enable color in screen or tmux (#92, @gmasse)
|
||||
- [x] Change `egrep` to `grep -E` in test and lib scripts to comply with ShellCheck (#92, @gmasse)
|
||||
- [x] Fix typo in FAQ (#92, @gmasse)
|
||||
- [x] Fix Travis CI failure on src/templater.sh (@gmasse)
|
||||
|
||||
## v2.3.0
|
||||
|
||||
|
@ -40,7 +40,7 @@ function templater() {
|
||||
fi
|
||||
|
||||
cp -f "${templateSrc}" "${templateDst}"
|
||||
for var in $(env |awk -F= '{print $1}' |grep -E '^[A-Z0-9_]+$'); do
|
||||
for var in $(env |awk -F= '{print $1}' |grep -E '^(_[A-Z0-9_]+|[A-Z0-9][A-Z0-9_]*)$'); do
|
||||
sed -i.bak -e "s#\${${var}}#${!var}#g" "${templateDst}"
|
||||
# this .bak dance is done for BSD/GNU portability: http://stackoverflow.com/a/22084103/151666
|
||||
rm -f "${templateDst}.bak"
|
||||
|
Loading…
Reference in New Issue
Block a user