-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·76 lines (61 loc) · 1.47 KB
/
configure
File metadata and controls
executable file
·76 lines (61 loc) · 1.47 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env zsh
#新しい環境に取り込んだ時のインストール
set -x
DIR=$(cd $(dirname $0); pwd)
if [ ! -e $(which git) ]; then
echo 'not found git'
fi
if [ ! -e $(which vim) ]; then
echo 'not found vim.'
echo 'Start installing ...'
$DIR/scripts/vim-install.sh
fi
if [[ -e $(which python) ]]; then
# Install powerline
pip install powerline-status powerline-mem-segment psutil netifaces
fi
setup_link()
{
from=$1
to=$2
if [[ -e $to ]]; then
if [[ -L $to ]]; then
return
elif [[ -d $to ]]; then
echo 'Linked:' $from.(:a) 'into' $to
ln -sfv $from(:a) $to
return
else
echo "aborted: Already ${dstpath} exists"
return
fi
else
fi
ln -sf $from(:A) $to
echo 'Linked:' $from '=>' $to
}
for dotfile in `git ls-tree --name-only HEAD | grep '^[._]'`; do
if [[ $dotfile =~ ".git($|module|ignore)" ]]; then
continue
fi
# ex) ./_gitignore -> .gitignore
dstpath="${HOME}/${${dotfile##*/}:s:_git:.git:}"
setup_link $dotfile $dstpath
done
for dotfile in $DIR/local_template/.*(.) ; do
file_name="${dotfile##*/}"
dstpath="$HOME/.local$file_name"
if [ -e $dstpath ]; then
echo "Already exists: ${dstpath}"
else
echo "$dotfile => $dstpath"
cp $dotfile $dstpath
fi
done
for dotfile in $DIR/scripts/*(x) ; do
file_name="${dotfile##*/}"
dstpath="$HOME/.local/bin/${dotfile##*/}"
setup_link $dotfile $dstpath
done
ln -sf $DIR/.zsh/zshenv.home ${HOME}/.zshenv
# vim:sw=2