detached 2e0e21d

feat(download): create dedicated download helper with gum spinners

commit
2e0e21d638504f078d5e9611785d7fd3f411816e
author
bnema · · 2025-10-21 06:13 UTC
parent
100763f
signature
unsigned
1 file · +80 -0
A install/helpers/download.sh +80 -0
@@ -0,0 +1,80 @@
1+#!/bin/bash
2+# Download all required ArchUp installation files from GitHub
3+
4+download_section() {
5+ local title="$1"
6+ local target_dir="$2"
7+ shift 2
8+ local files=("$@")
9+
10+ gum spin --spinner dot --title "$title" -- bash -c "
11+ for file in ${files[*]}; do
12+ curl -sL '$GITHUB_RAW/install/$target_dir/\$file' -o '$ARCHUP_INSTALL/$target_dir/\$file' 2>/dev/null
13+ done
14+ "
15+ gum style --foreground 2 "[OK] ${title/Downloading /Downloaded }"
16+}
17+
18+download_archup_files() {
19+ echo ""
20+ gum style --foreground 212 --bold "ArchUp Installer Download"
21+ echo ""
22+
23+ local GITHUB_RAW="$ARCHUP_RAW_URL"
24+
25+ # Create directory structure
26+ mkdir -p "$ARCHUP_INSTALL"/{helpers,preflight,partitioning,base,config,boot,repos,post-install,post-boot}
27+
28+ # Core files
29+ gum spin --spinner dot --title "Downloading core files..." -- bash -c "
30+ curl -sL '$GITHUB_RAW/install/bootstrap.sh' -o '$ARCHUP_INSTALL/bootstrap.sh' 2>/dev/null
31+ curl -sL '$GITHUB_RAW/logo.txt' -o '$ARCHUP_PATH/logo.txt' 2>/dev/null
32+ "
33+ gum style --foreground 2 "[OK] Core files downloaded"
34+
35+ # Helpers
36+ download_section "Downloading helpers..." "helpers" \
37+ all.sh config.sh logging.sh errors.sh presentation.sh chroot.sh cleanup.sh
38+
39+ # Preflight
40+ download_section "Downloading preflight checks..." "preflight" \
41+ all.sh guards.sh begin.sh identify.sh detect-environment.sh
42+
43+ # Partitioning
44+ download_section "Downloading partitioning scripts..." "partitioning" \
45+ all.sh detect-disk.sh partition.sh format.sh mount.sh
46+
47+ # Base system
48+ download_section "Downloading base system scripts..." "base" \
49+ all.sh kernel.sh pacstrap.sh fstab.sh
50+
51+ # Configuration
52+ download_section "Downloading config scripts..." "config" \
53+ all.sh system.sh user.sh network.sh
54+
55+ # Bootloader
56+ download_section "Downloading bootloader setup..." "boot" \
57+ all.sh limine.sh
58+
59+ # Repositories
60+ download_section "Downloading repository setup..." "repos" \
61+ all.sh aur.sh chaotic.sh
62+
63+ # Post-install
64+ download_section "Downloading post-install scripts..." "post-install" \
65+ all.sh boot-logo.sh plymouth.sh snapper.sh post-boot-setup.sh hooks.sh verify.sh unmount.sh
66+
67+ # Post-boot
68+ download_section "Downloading post-boot scripts..." "post-boot" \
69+ all.sh snapper.sh ssh-keygen.sh archup-cli.sh archup-first-boot.service
70+
71+ # Base packages
72+ gum spin --spinner dot --title "Downloading package list..." -- bash -c "
73+ curl -sL '$GITHUB_RAW/install/base.packages' -o '$ARCHUP_INSTALL/base.packages' 2>/dev/null
74+ "
75+ gum style --foreground 2 "[OK] Package list downloaded"
76+
77+ echo ""
78+ gum style --foreground 2 --bold "[OK] All files downloaded successfully"
79+ echo ""
80+}
@@ -0,0 +1,80 @@
1+#!/bin/bash
2+# Download all required ArchUp installation files from GitHub
3+
4+download_section() {
5+ local title="$1"
6+ local target_dir="$2"
7+ shift 2
8+ local files=("$@")
9+
10+ gum spin --spinner dot --title "$title" -- bash -c "
11+ for file in ${files[*]}; do
12+ curl -sL '$GITHUB_RAW/install/$target_dir/\$file' -o '$ARCHUP_INSTALL/$target_dir/\$file' 2>/dev/null
13+ done
14+ "
15+ gum style --foreground 2 "[OK] ${title/Downloading /Downloaded }"
16+}
17+
18+download_archup_files() {
19+ echo ""
20+ gum style --foreground 212 --bold "ArchUp Installer Download"
21+ echo ""
22+
23+ local GITHUB_RAW="$ARCHUP_RAW_URL"
24+
25+ # Create directory structure
26+ mkdir -p "$ARCHUP_INSTALL"/{helpers,preflight,partitioning,base,config,boot,repos,post-install,post-boot}
27+
28+ # Core files
29+ gum spin --spinner dot --title "Downloading core files..." -- bash -c "
30+ curl -sL '$GITHUB_RAW/install/bootstrap.sh' -o '$ARCHUP_INSTALL/bootstrap.sh' 2>/dev/null
31+ curl -sL '$GITHUB_RAW/logo.txt' -o '$ARCHUP_PATH/logo.txt' 2>/dev/null
32+ "
33+ gum style --foreground 2 "[OK] Core files downloaded"
34+
35+ # Helpers
36+ download_section "Downloading helpers..." "helpers" \
37+ all.sh config.sh logging.sh errors.sh presentation.sh chroot.sh cleanup.sh
38+
39+ # Preflight
40+ download_section "Downloading preflight checks..." "preflight" \
41+ all.sh guards.sh begin.sh identify.sh detect-environment.sh
42+
43+ # Partitioning
44+ download_section "Downloading partitioning scripts..." "partitioning" \
45+ all.sh detect-disk.sh partition.sh format.sh mount.sh
46+
47+ # Base system
48+ download_section "Downloading base system scripts..." "base" \
49+ all.sh kernel.sh pacstrap.sh fstab.sh
50+
51+ # Configuration
52+ download_section "Downloading config scripts..." "config" \
53+ all.sh system.sh user.sh network.sh
54+
55+ # Bootloader
56+ download_section "Downloading bootloader setup..." "boot" \
57+ all.sh limine.sh
58+
59+ # Repositories
60+ download_section "Downloading repository setup..." "repos" \
61+ all.sh aur.sh chaotic.sh
62+
63+ # Post-install
64+ download_section "Downloading post-install scripts..." "post-install" \
65+ all.sh boot-logo.sh plymouth.sh snapper.sh post-boot-setup.sh hooks.sh verify.sh unmount.sh
66+
67+ # Post-boot
68+ download_section "Downloading post-boot scripts..." "post-boot" \
69+ all.sh snapper.sh ssh-keygen.sh archup-cli.sh archup-first-boot.service
70+
71+ # Base packages
72+ gum spin --spinner dot --title "Downloading package list..." -- bash -c "
73+ curl -sL '$GITHUB_RAW/install/base.packages' -o '$ARCHUP_INSTALL/base.packages' 2>/dev/null
74+ "
75+ gum style --foreground 2 "[OK] Package list downloaded"
76+
77+ echo ""
78+ gum style --foreground 2 --bold "[OK] All files downloaded successfully"
79+ echo ""
80+}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 0

    ↑↓ moveenter openesc close