dotfiles/zimsetup.zsh

12 lines
335 B
Bash
Raw Normal View History

2018-04-05 12:34:27 +02:00
#!/usr/bin/env zsh
setopt EXTENDED_GLOB
for template_file ( ${ZDOTDIR:-${HOME}}/.zim/templates/* ); do
user_file="${ZDOTDIR:-${HOME}}/.${template_file:t}"
touch ${user_file}
( print -rn "$(<${template_file})$(<${user_file})" >! ${user_file} ) 2>/dev/null
done
chsh -s =zsh
zsh -c 'source ${ZDOTDIR:-${HOME}}/.zlogin'