detached 49bca67

feat(install): add automatic file download via curl for ISO installation

commit
49bca676ea7ea71c525ba2c6af721a358248e5f7
author
bnema · · 2025-10-19 08:13 UTC
parent
fd3c139
signature
unsigned
3 files · +68 -23
M Makefile +2 -2
@@ -20,7 +20,7 @@ check-syntax:
2020 @echo "========================================="
2121 @echo "Checking shell script syntax..."
2222 @echo "========================================="
23- @for script in install.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh install/repos/*.sh; do \
23+ @for script in install.sh install/bootstrap.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh install/repos/*.sh; do \
2424 if [ -f "$$script" ]; then \
2525 echo "Checking: $$script"; \
2626 bash -n "$$script" || exit 1; \
@@ -39,7 +39,7 @@ check-shellcheck:
3939 echo "Install with: sudo pacman -S shellcheck"; \
4040 exit 0; \
4141 fi
42- @for script in install.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh install/repos/*.sh; do \
42+ @for script in install.sh install/bootstrap.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh install/repos/*.sh; do \
4343 if [ -f "$$script" ]; then \
4444 echo ""; \
4545 echo "Checking: $$script"; \
@@ -20,7 +20,7 @@ check-syntax:
20 @echo "========================================="20 @echo "========================================="
21 @echo "Checking shell script syntax..."21 @echo "Checking shell script syntax..."
22 @echo "========================================="22 @echo "========================================="
23- @for script in install.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh install/repos/*.sh; do \23+ @for script in install.sh install/bootstrap.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh install/repos/*.sh; do \
24 if [ -f "$$script" ]; then \24 if [ -f "$$script" ]; then \
25 echo "Checking: $$script"; \25 echo "Checking: $$script"; \
26 bash -n "$$script" || exit 1; \26 bash -n "$$script" || exit 1; \
@@ -39,7 +39,7 @@ check-shellcheck:
39 echo "Install with: sudo pacman -S shellcheck"; \39 echo "Install with: sudo pacman -S shellcheck"; \
40 exit 0; \40 exit 0; \
41 fi41 fi
42- @for script in install.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh install/repos/*.sh; do \42+ @for script in install.sh install/bootstrap.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh install/repos/*.sh; do \
43 if [ -f "$$script" ]; then \43 if [ -f "$$script" ]; then \
44 echo ""; \44 echo ""; \
45 echo "Checking: $$script"; \45 echo "Checking: $$script"; \
M README.md +8 -21
@@ -84,21 +84,12 @@ archup/
8484 ### Quick Install (from Arch ISO)
8585
8686 ```bash
87-# Download and run archup installer
88-wget -O- https://raw.githubusercontent.com/bnema/archup/main/install.sh | bash
89-```
90-
91-Or download first, then run:
92-
93-```bash
94-# Download the installer
95-wget https://raw.githubusercontent.com/bnema/archup/main/install.sh
96-
97-# Make it executable
87+# Download the installation script (curl is available by default on Arch ISO)
88+curl -L https://raw.githubusercontent.com/bnema/archup/main/install.sh -o install.sh
9889 chmod +x install.sh
9990
100-# Run the installer
101-./install.sh
91+# Run the installer (it will download all required files)
92+sudo ./install.sh
10293 ```
10394
10495 **Note:** Phase 1 complete! The installer can now install a minimal bootable Arch Linux system. Ready for VM testing.
@@ -119,20 +110,16 @@ make check-syntax
119110 make check-shellcheck
120111 ```
121112
122-### Testing Installation (Phase 1)
113+### Testing Installation
123114 To test the installer in a VM (QEMU/KVM recommended):
124115
125116 ```bash
126117 # Boot Arch ISO in VM with UEFI enabled
127118 # Connect to internet
128-# Download archup
129-git clone https://github.com/bnema/archup.git
130-cd archup
131119
132-# Set the archup path
133-export ARCHUP_PATH=$(pwd)
134-
135-# Run the installer
120+# Download and run installer (automatically downloads all required files)
121+curl -L https://raw.githubusercontent.com/bnema/archup/main/install.sh -o install.sh
122+chmod +x install.sh
136123 sudo ./install.sh
137124 ```
138125
@@ -84,21 +84,12 @@ archup/
84 ### Quick Install (from Arch ISO)84 ### Quick Install (from Arch ISO)
85 85
86 ```bash86 ```bash
87-# Download and run archup installer87+# Download the installation script (curl is available by default on Arch ISO)
88-wget -O- https://raw.githubusercontent.com/bnema/archup/main/install.sh | bash88+curl -L https://raw.githubusercontent.com/bnema/archup/main/install.sh -o install.sh
89-```
90-
91-Or download first, then run:
92-
93-```bash
94-# Download the installer
95-wget https://raw.githubusercontent.com/bnema/archup/main/install.sh
96-
97-# Make it executable
98 chmod +x install.sh89 chmod +x install.sh
99 90
100-# Run the installer91+# Run the installer (it will download all required files)
101-./install.sh92+sudo ./install.sh
102 ```93 ```
103 94
104 **Note:** Phase 1 complete! The installer can now install a minimal bootable Arch Linux system. Ready for VM testing.95 **Note:** Phase 1 complete! The installer can now install a minimal bootable Arch Linux system. Ready for VM testing.
@@ -119,20 +110,16 @@ make check-syntax
119 make check-shellcheck110 make check-shellcheck
120 ```111 ```
121 112
122-### Testing Installation (Phase 1)113+### Testing Installation
123 To test the installer in a VM (QEMU/KVM recommended):114 To test the installer in a VM (QEMU/KVM recommended):
124 115
125 ```bash116 ```bash
126 # Boot Arch ISO in VM with UEFI enabled117 # Boot Arch ISO in VM with UEFI enabled
127 # Connect to internet118 # Connect to internet
128-# Download archup
129-git clone https://github.com/bnema/archup.git
130-cd archup
131 119
132-# Set the archup path120+# Download and run installer (automatically downloads all required files)
133-export ARCHUP_PATH=$(pwd)121+curl -L https://raw.githubusercontent.com/bnema/archup/main/install.sh -o install.sh
134-122+chmod +x install.sh
135-# Run the installer
136 sudo ./install.sh123 sudo ./install.sh
137 ```124 ```
138 125
M install.sh +58 -0
@@ -9,6 +9,64 @@ export ARCHUP_PATH="${ARCHUP_PATH:-$HOME/.local/share/archup}"
99 export ARCHUP_INSTALL="$ARCHUP_PATH/install"
1010 export ARCHUP_INSTALL_LOG_FILE="/var/log/archup-install.log"
1111 export ARCHUP_REPO_URL="${ARCHUP_REPO_URL:-https://github.com/bnema/archup}"
12+export ARCHUP_RAW_URL="https://raw.githubusercontent.com/bnema/archup/main"
13+
14+# Download installer files if not present (for curl-based installation)
15+if [ ! -d "$ARCHUP_INSTALL" ]; then
16+ echo "=== Downloading archup installer files ==="
17+ mkdir -p "$ARCHUP_INSTALL"
18+
19+ # Download all required files using curl
20+ GITHUB_RAW="$ARCHUP_RAW_URL"
21+
22+ # Create directory structure
23+ mkdir -p "$ARCHUP_INSTALL"/{helpers,preflight,partitioning,base,config,boot,repos,presets}
24+
25+ echo "Downloading core files..."
26+ curl -sL "$GITHUB_RAW/install/bootstrap.sh" -o "$ARCHUP_INSTALL/bootstrap.sh"
27+ curl -sL "$GITHUB_RAW/logo.txt" -o "$ARCHUP_PATH/logo.txt"
28+
29+ echo "Downloading helpers..."
30+ for file in all.sh logging.sh errors.sh presentation.sh chroot.sh; do
31+ curl -sL "$GITHUB_RAW/install/helpers/$file" -o "$ARCHUP_INSTALL/helpers/$file"
32+ done
33+
34+ echo "Downloading preflight..."
35+ for file in all.sh guards.sh begin.sh detect-environment.sh; do
36+ curl -sL "$GITHUB_RAW/install/preflight/$file" -o "$ARCHUP_INSTALL/preflight/$file"
37+ done
38+
39+ echo "Downloading partitioning..."
40+ for file in all.sh detect-disk.sh partition.sh format.sh mount.sh; do
41+ curl -sL "$GITHUB_RAW/install/partitioning/$file" -o "$ARCHUP_INSTALL/partitioning/$file"
42+ done
43+
44+ echo "Downloading base..."
45+ for file in all.sh kernel.sh pacstrap.sh fstab.sh; do
46+ curl -sL "$GITHUB_RAW/install/base/$file" -o "$ARCHUP_INSTALL/base/$file"
47+ done
48+
49+ echo "Downloading config..."
50+ for file in all.sh system.sh user.sh network.sh; do
51+ curl -sL "$GITHUB_RAW/install/config/$file" -o "$ARCHUP_INSTALL/config/$file"
52+ done
53+
54+ echo "Downloading boot..."
55+ for file in all.sh limine.sh; do
56+ curl -sL "$GITHUB_RAW/install/boot/$file" -o "$ARCHUP_INSTALL/boot/$file"
57+ done
58+
59+ echo "Downloading repos..."
60+ for file in all.sh yay.sh chaotic.sh; do
61+ curl -sL "$GITHUB_RAW/install/repos/$file" -o "$ARCHUP_INSTALL/repos/$file"
62+ done
63+
64+ echo "Downloading presets..."
65+ curl -sL "$GITHUB_RAW/install/presets/barebone.packages" -o "$ARCHUP_INSTALL/presets/barebone.packages"
66+
67+ echo "✓ All files downloaded successfully"
68+ echo ""
69+fi
1270
1371 # Bootstrap: Install gum and essential dependencies (plain text, no gum usage)
1472 source "$ARCHUP_INSTALL/bootstrap.sh"
@@ -9,6 +9,64 @@ export ARCHUP_PATH="${ARCHUP_PATH:-$HOME/.local/share/archup}"
9 export ARCHUP_INSTALL="$ARCHUP_PATH/install"9 export ARCHUP_INSTALL="$ARCHUP_PATH/install"
10 export ARCHUP_INSTALL_LOG_FILE="/var/log/archup-install.log"10 export ARCHUP_INSTALL_LOG_FILE="/var/log/archup-install.log"
11 export ARCHUP_REPO_URL="${ARCHUP_REPO_URL:-https://github.com/bnema/archup}"11 export ARCHUP_REPO_URL="${ARCHUP_REPO_URL:-https://github.com/bnema/archup}"
12+export ARCHUP_RAW_URL="https://raw.githubusercontent.com/bnema/archup/main"
13+
14+# Download installer files if not present (for curl-based installation)
15+if [ ! -d "$ARCHUP_INSTALL" ]; then
16+ echo "=== Downloading archup installer files ==="
17+ mkdir -p "$ARCHUP_INSTALL"
18+
19+ # Download all required files using curl
20+ GITHUB_RAW="$ARCHUP_RAW_URL"
21+
22+ # Create directory structure
23+ mkdir -p "$ARCHUP_INSTALL"/{helpers,preflight,partitioning,base,config,boot,repos,presets}
24+
25+ echo "Downloading core files..."
26+ curl -sL "$GITHUB_RAW/install/bootstrap.sh" -o "$ARCHUP_INSTALL/bootstrap.sh"
27+ curl -sL "$GITHUB_RAW/logo.txt" -o "$ARCHUP_PATH/logo.txt"
28+
29+ echo "Downloading helpers..."
30+ for file in all.sh logging.sh errors.sh presentation.sh chroot.sh; do
31+ curl -sL "$GITHUB_RAW/install/helpers/$file" -o "$ARCHUP_INSTALL/helpers/$file"
32+ done
33+
34+ echo "Downloading preflight..."
35+ for file in all.sh guards.sh begin.sh detect-environment.sh; do
36+ curl -sL "$GITHUB_RAW/install/preflight/$file" -o "$ARCHUP_INSTALL/preflight/$file"
37+ done
38+
39+ echo "Downloading partitioning..."
40+ for file in all.sh detect-disk.sh partition.sh format.sh mount.sh; do
41+ curl -sL "$GITHUB_RAW/install/partitioning/$file" -o "$ARCHUP_INSTALL/partitioning/$file"
42+ done
43+
44+ echo "Downloading base..."
45+ for file in all.sh kernel.sh pacstrap.sh fstab.sh; do
46+ curl -sL "$GITHUB_RAW/install/base/$file" -o "$ARCHUP_INSTALL/base/$file"
47+ done
48+
49+ echo "Downloading config..."
50+ for file in all.sh system.sh user.sh network.sh; do
51+ curl -sL "$GITHUB_RAW/install/config/$file" -o "$ARCHUP_INSTALL/config/$file"
52+ done
53+
54+ echo "Downloading boot..."
55+ for file in all.sh limine.sh; do
56+ curl -sL "$GITHUB_RAW/install/boot/$file" -o "$ARCHUP_INSTALL/boot/$file"
57+ done
58+
59+ echo "Downloading repos..."
60+ for file in all.sh yay.sh chaotic.sh; do
61+ curl -sL "$GITHUB_RAW/install/repos/$file" -o "$ARCHUP_INSTALL/repos/$file"
62+ done
63+
64+ echo "Downloading presets..."
65+ curl -sL "$GITHUB_RAW/install/presets/barebone.packages" -o "$ARCHUP_INSTALL/presets/barebone.packages"
66+
67+ echo "✓ All files downloaded successfully"
68+ echo ""
69+fi
12 70
13 # Bootstrap: Install gum and essential dependencies (plain text, no gum usage)71 # Bootstrap: Install gum and essential dependencies (plain text, no gum usage)
14 source "$ARCHUP_INSTALL/bootstrap.sh"72 source "$ARCHUP_INSTALL/bootstrap.sh"

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