-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·84 lines (68 loc) · 1.75 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
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
#!/bin/bash
# Folders
dirs=(~/.ssh
~/.config/autostart
~/.emacs.d/plugins
~/apps
~/dev
~/libs
)
# Apt-get apps
apt_apps=(emacs
curl
git
tree
python-pip
python-dev
wget
thefuck
)
# Other repositories, formatted as <git-url, folder>
repos=(
)
# Setting up folder structure
for dir in ${dirs[*]}
do
if [ ! -d "$dir" ]; then
mkdir -p $dir
echo "Created $dir"
fi
done
# Install apt apps
echo "Updating ubuntu ..."
sudo apt-get update
echo "Installing apps ..."
sudo apt-get install -y ${apt_apps[*]}
# Config files
if [ ! -d $HOME/dev/dotfiles ]; then
echo "Cloning config files ..."
git clone --recursive https://github.com/MathiasCiarlo/dotfiles.git ~/dev/dotfiles
fi
# Install other stuff
echo "Installing fuck ..."
wget -O - https://raw.githubusercontent.com/nvbn/thefuck/master/install.sh | sh - && $0
# @
echo "Installing @ ..."
sudo pip install paramiko
git clone https://github.com/larstvei/at.git ~/apps/at
# Symbolic links
symlinks=("$HOME/dev/dotfiles/emacs/.emacs $HOME/.emacs"
"$HOME/dev/dotfiles/.bash_aliases $HOME/.bash_aliases"
"$HOME/dev/dotfiles/.ssh/config $HOME/.ssh/config"
"$HOME/dev/dotfiles/.config/autostart/gnome-terminal.desktop $HOME/.config/autostart/gnome-terminal.desktop"
)
echo "Creating symbolic links ..."
for ((i = 0; i < ${#symlinks[*]}; i++))
do
ln -fs ${symlinks[$i]}
echo "Created symlink " ${symlinks[$i]}
done
# Load aliases
echo "Loading aliases"
. ~/dev/dotfiles/.bash_aliases
# Change Caps lock to Ctrl
gsettings set org.gnome.desktop.input-sources xkb-options "['ctrl:nocaps']"
# Git setup
export EDITOR="emacs -nw"
# TODO
## Java setup