-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sh
executable file
·43 lines (34 loc) · 1.46 KB
/
init.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
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
DOTFILES_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DOTFILES_SETTINGS_FILE="${HOME}/.config/dotfiles/settings.env"
if ${DEBUG+"false"}; then
DEBUG=
fi
# these are just common util functions that will be used by other scripts
# this does not yet perform any changes in the system yet
source "$DOTFILES_ROOT/setup/utils/strings.sh"
source "$DOTFILES_ROOT/setup/utils/layout.sh"
source "$DOTFILES_ROOT/setup/utils/filesystem.sh"
source "$DOTFILES_ROOT/setup/utils/system.sh"
echo -e "\n$(bgCyan)$(black) DOTFILES $(clr) ($(gray)root:$(clr) $(pretty_path "$DOTFILES_ROOT"))"
echo -e "\n$(gray)Using settings from:$(clr) $(pretty_path "$DOTFILES_SETTINGS_FILE")"
# ask for sudo permssions only if needed
if ! sudo --validate -n &>/dev/null; then
echo -e "\nGet sudo permissions"
sudo -v --prompt=" $(cyan)◆$(clr) %p password: "
fi
# pull git submodules if needed
if git submodule status | grep "^-"; then
git submodule update --init
fi
# @todo add README.md file https://github.com/aaronbates/dotfiles/blob/master/README.md
source "$DOTFILES_ROOT/setup/setup_dependencies.sh"
source "$DOTFILES_ROOT/setup/setup_assets.sh"
source "$DOTFILES_ROOT/setup/setup_git.sh"
source "$DOTFILES_ROOT/setup/setup_homedir.sh" "${HOME}"
source "$DOTFILES_ROOT/setup/setup_osx.sh"
source "$DOTFILES_ROOT/setup/setup_ssh.sh"
source "$DOTFILES_ROOT/setup/setup_shell.sh"
echo -e '\n\n✅ All done! Your system is ready to roll! 🔥 🔥 🔥'