[README] create template file if it doesn't exist

This commit is contained in:
Matt Hamilton 2016-02-11 03:08:40 -05:00
parent e42afb7d99
commit be2e54c0fc
1 changed files with 1 additions and 0 deletions

View File

@ -52,6 +52,7 @@ by following the instructions below:
setopt EXTENDED_GLOB
for template_file ( ${ZDOTDIR:-${HOME}}/.zim/templates/* ); do
user_file="${ZDOTDIR:-${HOME}}/.${template_file:t}"
touch ${user_file}
( print -n "$(<${template_file})\n$(<${user_file})" >! ${user_file} ) 2>/dev/null
done
```