-
Notifications
You must be signed in to change notification settings - Fork 1
/
install
executable file
·61 lines (53 loc) · 1.59 KB
/
install
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
#!/usr/bin/env zsh
set -e
dir=$(pwd)
# Begin installation:
echo -e "Installing dot-files:"
echo -e "[+] Creating soft-links to dot-files."
# Soft-link all files and directories (except .git of course)
for dotfile in $(find $dir -maxdepth 1 -name ".*" | sed '/.git$/d'); do
if [[ -d $dotfile ]]; then
echo -e "\t[>] Copying $dotfile"
cp -r $dotfile ~
else
echo -e "\t[>] Linking $dotfile"
ln -sf $dotfile ~
fi
done
# Prevent rvm from being loaded twice
if [[ -f ~/.zlogin ]];
then
mv ~/.zlogin $dir/.zlogin.backup
fi
# Sublime text
if [[ -d "/Applications/Sublime Text.app" ]];
then
if [[ ! -f $dir/bin/subl ]];
then
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" $dir/bin/subl
fi
fi
# Copy bin as well
echo -e "\t[>] Linking $dir/bin"
ln -sf $dir/bin ~
if [[ ! -d ~/peda ]]; then
echo -e "[+] Installing peda (gdb)."
git clone https://github.com/longld/peda.git ~/peda &> /dev/null
fi
# Install vim packages
if [[ ! -d ~/.vim/pack/bundle/start ]]; then
echo -e "[+] Adding vim packages."
mkdir -p ~/.vim/pack/bundle/start
cd ~/.vim/pack/bundle/start
git clone https://github.com/AlessandroYorba/Sierra &> /dev/null
git clone https://github.com/itchyny/lightline.vim &> /dev/null
git clone https://github.com/ervandew/supertab.git &> /dev/null
git clone https://github.com/airblade/vim-gitgutter &> /dev/null
else
echo -e "[+] Updating vim packages."
for package in $(ls ~/.vim/pack/bundle/start); do
cd ~/.vim/pack/bundle/start/$package
git pull &> /dev/null
done
fi
echo -e "[!] Restart terminal session for changes to take effect."