Repository navigation
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·64 lines (54 loc) · 1.44 KB
/
Copy pathdeploy.sh
File metadata and controls
executable file
·64 lines (54 loc) · 1.44 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
#!/bin/bash
# Detect the OS
uname=$(uname)
# Remove existing vim directory
rm -rf ~/.vim
# Update the git submodules
git submodule update --init --recursive
# Create a .vim directory if necessary
if [ ! -d ~/.vim ]; then
mkdir ~/.vim
fi
if [[ ${uname} == "Linux" ]]; then
# Copy with backups (on Linux only)
cp -bf .vimrc ~/
cp -bf .pylintrc ~/
cp -R -f .vim/* ~/.vim/
elif [[ ${uname} == "Darwin" ]]; then
# No backups on OS X
cp -f .vimrc ~/
cp -f .pylintrc ~/
cp -R -f .vim/* ~/.vim/
# Add custom Bash prompt
echo <<-EOF >> ~/.profile
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\] \[\033[33;1m\]\w\[\033[m\] (\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)) \n\$ "
EOF
# Add custom Zsh prompt
cat custom_zshrc >> ~/.zshrc
fi
# Copy over custom fonts
if [[ ${uname} == "Linux" ]]; then
if [ "$1" = "-no-terminal-updates" ]; then
echo "[!] Skipping font installation."
else
echo "Installing fonts..."
if [ ! -d ~/.fonts ]; then
mkdir ~/.fonts
fi
cp -R -f .fonts/* ~/.fonts
fc-cache -f
echo "... done"
fi
elif [[ ${uname} == "Darwin" ]]; then
echo "Don't know how to copy/update fonts on Mac. Please manually install .fonts/"
fi
# Install custom GNOME terminal colors
if [[ ${uname} == "Linux" ]]; then
if [ "$1" = "-no-terminal-updates" ]; then
echo [!] Skipping terminal color installation.
else
cd gnome-terminal-colors-monokai && ./install.sh ; cd ..
fi
fi
# Add a custom PS1
cat < ./custom_bashrc >> ~/.bashrc