-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdotfiles.sh
executable file
·51 lines (48 loc) · 1.25 KB
/
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
#!/bin/sh -e
echo "Not implemented..."
main() {
case $(uname | tr '[:upper:]' '[:lower:]') in
linux*)
PLATFORM="linux"
;;
darwin*)
PLATFORM="macos"
;;
msys*)
PLATFORM="windows"
warn "Run init.ps1 instead"
exit 1
;;
*)
error "Unknown platform – $(uname | tr '[:upper:]' '[:lower:]') is not supported"
exit 1
;;
esac
# Install
case "${ACTION}" in
install)
heading "Installing kylejb/dotfiles"
clone_dotfiles
setup_config_files
install_tools
set_default_shell
reminders
completed "Enjoy your new environment!"
;;
update)
# TODO: add support for updating/refreshing changes
warn "This action is not yet supported"
exit 1
;;
uninstall)
heading "Uninstalling kylejb/dotfiles"
warn "This uninstall script does not remove packages/tools installed with apt, Chocolatey, or Homebrew"
remove_dirs
completed "Enjoy your clean environment!"
;;
*)
error "Unknown ACTION (${ACTION}). If this was a bug, please report it: https://github.com/kylejb/dotfiles/issues/new"
exit 1
;;
esac
}