1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#! /usr/bin/env zsh
# quick setup for ksw zsh conf. Written in 10" and
# veeeery poorly tested. It just works, will be rewritten
# soon
# hash of source file and destination place
# original_file linked_file_path
typeset -A kswflist
kswflist=(
~/.myenv/zsh/dist/zshrc ~/.zshrc
~/.myenv/vim/vimrc ~/.vimrc
~/.myenv/vim/gvimrc ~/.gvimrc
~/.myenv/vim/vim ~/.vim
)
# copy the distribution
cp -R `readlink -f ${0:h}` ~/.myenv
for f in ${(k)kswflist}
do
# stupid backup, no multimple chk & no automatic restore
if test -f ${kswflist[$f]} ; then
mv ${kswflist[$f]}{,${kswflist[$f]}.org}
print "renamed ${kswflist[$f]} in ${kswflist[$f]}.org"
fi
# link the stuff to their destinantion place
ln -s $f ${kswflist[$f]}
print "linked ${kswflist[$f]}"
done
print "REMENBER:"
print " update Vim plugins via :BundleInstall!"
print " you need git to update :-)"
|