-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_dotfiles.sh
executable file
·103 lines (87 loc) · 2.51 KB
/
install_dotfiles.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/usr/bin/env bash
# note:
# - You will be asked for sudo password when installing packages.
#
# TODO:
# - fonts
# - adapt for an arch installation
# - fun cli apps flag (fortune, cowsay, etc)
# - add other desktop apps
# - ssh config?
# - aliases ?
# - def a func that creates a section in bashrc for dotfiles,
# and adds whatever I need set into that section (avoid clutter)
# - add a title section
# - make xfce customization optional
source utils/base.sh
echo ""
PYTHON_SETUP=false
HUION_SETUP=false
INSTALL_CONFIG_FILES=true
INSTALL_THEMES=true
. $DOTFILES/utils/distro.sh
detect_distro || echo_bad_die
load_package_manager && echo_good "'$DISTRO' detected, appropriate package manager loaded."
while getopts ":Hhpf" opt; do
case $opt in
H) # help
show_usage $OK_CODE
;;
h) # huion tablet installation
HUION_SETUP=true
;;
f) # force
# --force | this will not run regular dotfiles scripts, but only
# the other option specified (e.g. ./install_dotfiles -fp)
INSTALL_CONFIG_FILES=false
INSTALL_THEMES=false
;;
p) # python
PYTHON_SETUP=true
;;
\?)
echo "Invalid option: -$OPTARG" >&2
show_usage $ERROR_CODE
;;
esac
done
if [ "$INSTALL_THEMES" = true ]; then
# customization
echo_header "Setting up XFCE4 Themes"
. "$DOTFILES"/xfce4/setup.sh
print_horizontal_line
echo_header "Setting up Wallpaper directory"
. "$DOTFILES"/wallpaper/setup.sh
print_horizontal_line
fi
if [ "$PYTHON_SETUP" = true ]; then
echo_header "Setting up Python"
. "$DOTFILES"/python/setup.sh
print_horizontal_line
fi
if [ "$INSTALL_CONFIG_FILES" = true ]; then
# apps installation
if [ "$HUION_SETUP" = true ]; then
echo_header "Setting up Huion Tablet"
. "$DOTFILES"/extras/setup_huion.sh
print_horizontal_line
fi
echo_header "Installing rustup toolchain and cargo"
. "$DOTFILES"/apps/setup-cargo.sh
print_horizontal_line
for script in "$DOTFILES"/apps/install-*.sh; do
. "$script"
print_horizontal_line
done
echo_header "Setting up Neovim"
. "$DOTFILES"/neovim/setup.sh
print_horizontal_line
echo_header "Setting up Git"
. "$DOTFILES"/git/setup.sh
print_horizontal_line
echo_header "Setting up Starship Prompt"
. "$DOTFILES"/starship-prompt/setup.sh
print_horizontal_line
fi
echo ""
echo_good "All done. Enjoy!"