-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·51 lines (43 loc) · 2.12 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·51 lines (43 loc) · 2.12 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env bash
# Unified setup entrypoint (docs/UNIFICATION.md, issue #36).
# Usage: bash setup.sh [--optional] [--work] [--personal] [--base] [--tags <csv>]
# [--dry-run] [--platform <macos|ubuntu|arch|server>]
# [--profile <desktop|server>]
# --optional also install low-priority optional packages
# --work also install work-only packages
# --personal also install personal-only packages
# --base install only the base essentials (no category packages)
# --tags <csv> install base + only the named categories, e.g.
# --tags development,terminal (categories are packages.json tags)
# --dotfiles deploy only the shared dotfiles (~/.zshrc, ~/.tmux.conf,
# ~/.zsh_plugins.txt, ~/.p10k.zsh); installs no packages.
# Ignores all selection flags; combine with --dry-run to preview.
# --dry-run print all commands without executing anything
#
# Run bare on a terminal (no selection flags) and setup prompts you to pick
# categories interactively; base essentials are always installed.
# --platform <p> force platform; default: auto-detect (uname / /etc/os-release).
# --distro <ubuntu|arch> is accepted as an alias.
# --profile server headless server profile (apt only, no GUI packages);
# never auto-detected — Debian desktops and the Pi look alike.
#
# Package data lives in packages.json; the engine is lib/core.sh; per-platform
# quirks live in platforms/<platform>.sh.
set -euo pipefail
SETUP_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=lib/core.sh
source "$SETUP_ROOT/lib/core.sh"
core_parse_args "$@"
core_detect_platform
# --dotfiles deploys configs only, so it short-circuits ahead of tag validation
# and the interactive category prompt — neither has anything to select.
if [[ "$DOTFILES_ONLY" == true ]]; then
core_resolve_config_src_dir
deploy_dotfiles
exit 0
fi
core_validate_tag_selection
core_maybe_prompt_selection
# shellcheck source=/dev/null
source "$SETUP_ROOT/platforms/$PLATFORM.sh"
platform_main