-
Notifications
You must be signed in to change notification settings - Fork 10
/
redot
executable file
·65 lines (57 loc) · 1.26 KB
/
redot
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
#
# This script will:
# - Set the MacOS defaults
# - Install Homebrew (if necessary)
# - Upgrade Homebrew
# - Install software
# - Symlink all the dotfiles
export DOTHOME=$HOME/dotfiles
source $DOTHOME/lib/common
# Set MacOS defaults
if [ -f $DOTHOME/macos/set-defaults ]
then
source $DOTHOME/macos/set-defaults
set_macos_preferences
fi
# Install Homebrew
if [ -f $DOTHOME/lib/install-brew ]
then
source $DOTHOME/lib/install-brew
install_brew
fi
# Upgrade Homebrew
if test "$(uname)" = "Darwin"
then
user "Upgrade Homebrew? (y/n)"
else
user "Upgrade Linuxbrew? (y/n)"
fi
read -s -n 1 response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
if test $(which brew)
then
brew update
else
if test "$(uname)" = "Darwin"
then
info "Homebrew is not installed"
else
info "Linuxbrew is not installed"
fi
fi
fi
# Install software
if [ -f $DOTHOME/lib/install-software ]
then
source $DOTHOME/lib/install-software
install_software
fi
# Symlink all the dotfiles
if [ -f $DOTHOME/lib/symlink-dotfiles ]
then
source $DOTHOME/lib/symlink-dotfiles
symlink_dotfiles $DOTFILES_ROOT
#info "The symlinked dotfiles are:"
#show_symlinked_dotfiles
fi