-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·101 lines (70 loc) · 1.94 KB
/
install.sh
File metadata and controls
executable file
·101 lines (70 loc) · 1.94 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/bin/bash
WORKING_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DOTFILES=(bashrc ctags gitconfig prompt vimrc)
printf "\nInstalling packages...\n\n"
sudo add-apt-repository ppa:snwh/ppa
sudo add-apt-repository ppa:tista/adapta
sudo apt-get update
sudo pip install flake8
sudo apt -y -q install \
build-essential \
cmake \
python-dev \
python3-dev \
terminator \
python-dev \
adapta-gtk-theme \
vim-gtk3 \
fonts-inconsolata \
gnome-tweak-tool \
gnome-session \
paper-icon-theme \
exuberant-ctags \
terminator \
curl \
virtualbox \
git \
ipython3 \
keepass2 \
python-pip \
python-pip-whl \
curl https://releases.hashicorp.com/vagrant/2.1.2/vagrant_2.1.2_x86_64.deb -O vagrant.deb
sudo dpkg -i vagrant.deb && rm vagrant.deb
printf "\nInstalling vundle for vim...\n\n"
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
printf "\nChecking dotfiles...\n\n"
for FILE in "${DOTFILES[@]}"
do
TARGET="$WORKING_DIR/$FILE"
LINK_NAME="$HOME/.$FILE"
if [ -e "$LINK_NAME" ]; then
if [ ! -L "$LINK_NAME" ]; then
echo "$LINK_NAME exists and is not a symbolic link, we might lose data if we touch this, you decide what to do"
continue
fi
if [ -L "$LINK_NAME" ]; then
if [ "$(readlink $LINK_NAME)" = "$TARGET" ]; then
echo "$LINK_NAME is already linked"
continue
else
echo "$TARGET $LINK_NAME is not already linked, linked to $(readlink $LINK_NAME) instead"
unlink $LINK_NAME
ln -s $TARGET $LINK_NAME
echo "Installed $LINK_NAME"
continue
fi
fi
else
if [ -L "$LINK_NAME" ]; then
echo "$LINK_NAME is a broken link! We need to unlink and relink"
unlink $LINK_NAME
ln -s $TARGET $LINK_NAME
echo "Installed $LINK_NAME"
else
echo "$LINK_NAME really doesn't exist, we can just link it"
ln -s $TARGET $LINK_NAME
echo "Installed $LINK_NAME"
fi
fi
done
vim +PluginInstall