-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·97 lines (85 loc) · 2.24 KB
/
Copy pathbuild.sh
File metadata and controls
executable file
·97 lines (85 loc) · 2.24 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/usr/bin/env bash
# Build script - concatenates all modules into single devboost.sh
set -euo pipefail
OUT="devboost.sh"
{
# Entry point
cat devboost.sh.in
# Core framework (order matters)
echo ""
echo "# === Core Framework ==="
cat core/core_log.sh
echo ""
cat core/core_os.sh
echo ""
cat core/core_yaml.sh
echo ""
cat core/core_files.sh
echo ""
cat core/core_omz.sh
echo ""
cat core/core_modules.sh
echo ""
cat core/core_main.sh
# Modules (order matters - dependencies first)
echo ""
echo "# === Modules ==="
cat modules/module_pkg.sh
echo ""
cat modules/module_znap.sh
echo ""
cat modules/module_zsh.sh
echo ""
cat modules/module_starship.sh
echo ""
cat modules/module_tmux.sh
echo ""
cat modules/module_mise.sh
echo ""
cat modules/module_corepack.sh
echo ""
cat modules/module_direnv.sh
echo ""
cat modules/module_git.sh
echo ""
cat modules/module_services.sh
echo ""
cat modules/module_security.sh
# Module registration (must be after all modules are defined)
echo ""
echo "# === Module Registration ==="
cat << 'REGEOF'
db_load_modules() {
# Register all modules
db_module_pkg_register
db_module_znap_register
db_module_zsh_register
db_module_starship_register
db_module_tmux_register
db_module_mise_register
db_module_corepack_register
db_module_direnv_register
db_module_git_register
db_module_services_register
db_module_security_register
db_log_verbose "Loaded ${#DB_MODULE_NAMES[@]} modules"
}
REGEOF
# Main execution
echo ""
echo "# === Main Execution ==="
cat << 'MAINEOF'
# Run main if script is executed directly
# Use ${BASH_SOURCE[0]:-} to handle unbound variable (when piped from stdin)
# When piped: BASH_SOURCE[0] is unbound/empty, $0 is usually "-bash" or starts with "-"
# When executed directly: BASH_SOURCE[0] == $0
# When sourced: BASH_SOURCE[0] != $0 (and we don't want to run)
_bash_source="${BASH_SOURCE[0]:-}"
if [[ "$_bash_source" == "${0}" ]] || [[ -z "$_bash_source" ]]; then
coreMain "$@"
fi
MAINEOF
} > "$OUT"
chmod +x "$OUT"
echo "Built: $OUT"
echo "Size: $(wc -l < "$OUT") lines"