-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild
More file actions
executable file
·32 lines (28 loc) · 586 Bytes
/
build
File metadata and controls
executable file
·32 lines (28 loc) · 586 Bytes
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
#!/usr/bin/env bash
# build - assemble src/*.sh into a single hdi script
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
OUT="$SCRIPT_DIR/hdi"
# Concatenation order matters
sources=(
src/header.sh
src/args.sh
src/colors.sh
src/readme.sh
src/parse.sh
src/extract.sh
src/display.sh
src/render.sh
src/picker.sh
src/platform.sh
src/needs.sh
src/json.sh
src/main.sh
)
: > "$OUT"
for src in "${sources[@]}"; do
cat "$SCRIPT_DIR/$src" >> "$OUT"
printf '\n' >> "$OUT"
done
chmod +x "$OUT"
echo "Built: $OUT ($(wc -l < "$OUT" | tr -d ' ') lines)"