forked from nickdiego/magic-dot-files
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·60 lines (42 loc) · 1.18 KB
/
setup.sh
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
#!/bin/bash
sudo apt-get install vim-gtk clang exuberant-ctags git python-fontforge unzip
git submodule update --init
git submodule foreach git checkout master
pushd .vim/unbundle/general/vim-powerline
git checkout develop
popd
for file in `ls -A -I .git -I .gitmodules -I setup.sh -I .kde`;
do
echo $PWD/$file
if [ $PWD/$file == `readlink -f $HOME/$file` ]; then
echo "skipping..."
continue
elif [ -e $HOME/$file ]; then
echo "backuping..."
mv $HOME/$file $HOME/$file-backup-`date +%Y%m%d%H%M%S`
echo "replacing..."
else
echo "linking..."
fi
ln -sf $PWD/$file $HOME
done
ls $HOME/.fonts/Ubuntu*-Powerline.ttf > /dev/null
if [ $? -ne 0 ]; then
mkdir -p ~/tmp
wget -c http://font.ubuntu.com/download/ubuntu-font-family-0.80.zip -O ~/tmp/ubuntu-font-family-0.80.zip
unzip ~/tmp/ubuntu-font-family-0.80.zip -d ~/tmp
pushd ~/tmp/ubuntu-font-family-0.80
chmod +x ~/.vim/unbundle/general/vim-powerline/fontpatcher/fontpatcher
for f in `ls *.ttf`;
do
~/.vim/unbundle/general/vim-powerline/fontpatcher/fontpatcher $f
done
fonts=`ls *Powerline.ttf`
if [ $? -eq 0 ]; then
mkdir -p $HOME/.fonts
cp $fonts $HOME/.fonts
sudo fc-cache -vf
fi
popd
rm -rf ~/tmp
fi