-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdotfiles-deploy.bash
executable file
·88 lines (66 loc) · 1.81 KB
/
dotfiles-deploy.bash
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
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
readonly DOTFILES_HOME="${HOME}/dotfiles"
# shellcheck source=lib/functions.bash
source "${DOTFILES_HOME}/lib/functions.bash"
configure_ubuntu() {
bash scripts/dotfiles-install-ubuntu-apt-packages
bash scripts/dotfiles-configure-bash
bash scripts/dotfiles-install-homebrew-packages
bash scripts/dotfiles-configure-vim
bash scripts/dotfiles-configure-tmux
}
configure_wsl_ubuntu() {
bash scripts/dotfiles-install-ubuntu-apt-packages
# This task assumes that the src direcory is manually configured with cloud
# storage service.
ln -sf /mnt/c/Users/bboykov/drive "$HOME/drive"
bash scripts/dotfiles-configure-bash
bash scripts/dotfiles-configure-vim
bash scripts/dotfiles-configure-tmux
}
configure_fedora() {
export SET_DEBUG=1
bash scripts/dotfiles-install-fedora-dnf-packages
bash scripts/dotfiles-configure-bash
bash scripts/dotfiles-install-homebrew-packages
bash scripts/dotfiles-configure-vim
bash scripts/dotfiles-configure-tmux
}
configure_macos() {
bash scripts/dotfiles-install-homebrew-packages
bash scripts/dotfiles-configure-bash
bash scripts/dotfiles-configure-vim
bash scripts/dotfiles-configure-tmux
}
main() {
local platform
ensure_directories=(
"${HOME}/bin"
"${HOME}/wd/me"
"${HOME}/wd/me/github"
"${HOME}/wd/me/gitlab-com"
"${HOME}/wd/me/gogs"
"${HOME}/work"
)
util::info_message "dotfiles begin"
util::ensure_directories_exists "${ensure_directories[@]}"
platform="$(util::detect_platform)"
case "${platform}" in
ubuntu)
configure_ubuntu
;;
wsl-ubuntu)
configure_wsl_ubuntu
;;
fedora)
configure_fedora
;;
macos)
configure_macos
;;
esac
util::info_message "dotfiles-deploy.bash successfully finished!"
}
main "$@"