-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·76 lines (64 loc) · 1.47 KB
/
install.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
#!/bin/env bash
DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
if [ ! -d $HOME/.local/bin ]; then
mkdir -p $HOME/.local/bin
fi
if [ ! -d $HOME/.local/man/man1 ]; then
mkdir -p $HOME/.local/man/man1
fi
# Create symlinks to config
DOTFILES=(
"bin"
".vim"
".bashrc"
".bash_profile"
".gitconfig"
".inputrc"
".profile"
".ripgreprc"
".tmux.conf"
".uncrustify.cfg"
".xinitrc"
".sig"
".config/gdb"
".config/mpv"
".local/share/fonts"
)
for dotfile in "${DOTFILES[@]}";do
rm -rf "${HOME}/${dotfile}"
ln -sf "${DIR}/${dotfile}" "${HOME}/${dotfile}"
done
# Config location for gdb is not fixed
# Sometimes it's $XDG_CONFIG_HOME/gdb/gdbinit
# Sometimes it's $HOME/.gdbinit
# So use sourcing on all possible gdb init files
echo 'source ~/.config/gdb/gdbinit' > ~/.gdbinit
# Create symlinks for Neovim to use Vim config
ln -sf "${DIR}/.vim" "${HOME}/.config/nvim"
ln -sf "${DIR}/.vim/vimrc" "${HOME}/.config/nvim/init.vim"
# Install oft-used software
if [ "$1" == "-a" ]; then
sudo apt install \
acpi \
curl \
deluge \
ffmpeg \
git \
htop \
mpv \
mupdf \
p7zip-full \
pavucontrol \
rar \
ripgrep \
silversearcher-ag \
tree \
uncrustify \
universal-ctags \
valgrind \
wget \
x11-xkb-utils \
xbacklight \
xclip \
zip
fi