forked from driesvints/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup
More file actions
executable file
·36 lines (29 loc) · 1.17 KB
/
setup
File metadata and controls
executable file
·36 lines (29 loc) · 1.17 KB
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
#!/usr/bin/env bash
# Uncomment this next line and commit the change to make dotfile installs into
# any new codespaces a no-op. Useful for debugging devcontainer builds without
# worrying about whether your dotfiles are causing issues.
# [[ -n "${CODESPACES:-}" ]] && exit 0
original_args="$@"
[[ -n "${DEBUG:-}" ]] && echo -e "\033[90mCDing into $(dirname "$0")\033[0m" || true
cd "$(dirname "$0")" # SCRIPT_DIR_PATH="${0:A:h}"
[[ -n "${DEBUG:-}" ]] && echo -e "\033[90mSourcing runtime script\033[0m" || true
source ./scripts/helpers/runtime.sh
[[ -n "${DEBUG:-}" ]] && echo -e "\033[90mSourcing trap and trace script\033[0m" || true
source ./bin/helpers/trap_and_trace.sh
log_info "Beginning setup"
prompt_password
if [[ "$(is_codespace)" != "true" ]]; then
scripts/install-prerequisites
else
log_attention "Prerequisites mode not supported in Codespaces; skipping $0"
fi
if ! is_bootstrap_mode; then
if [[ "$(is_codespace)" == "true" ]]; then
scripts/bootstrap-codespaces
elif [[ "$(is_macos)" == "true" || "$(is_linux)" == "true" ]]; then
scripts/bootstrap-workstation
else
log_attention "Unrecognized environment; skipping $0"
fi
fi
log_success "Setup complete!"