11 lines
171 B
Bash
11 lines
171 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
safevar() {
|
||
|
echo "$@" | sed 's_/_\\/_g'
|
||
|
}
|
||
|
|
||
|
subvars() {
|
||
|
echo "$@" \
|
||
|
| sed "s/{{home}}/$(safevar $HOME)/g" \
|
||
|
| sed "s/{{user}}/$USER/g"
|
||
|
}
|