detached 09b7a59

fix(install): enable curl-pipe installation with interactive prompts and proper bootstrap

commit
09b7a59c29b34e9200e036ce51e8fec11afc214a
author
bnema · · 2025-10-20 19:50 UTC
committer
bnema · · 2025-10-20 20:55 UTC
parent
d29f303
signature
unsigned
3 files · +55 -19
A CHANGELOG.md +25 -0
@@ -0,0 +1,25 @@
1+# Changelog
2+
3+All notable changes to this project will be documented in this file.
4+
5+## [Unreleased]
6+
7+### Fixed
8+- **Curl-pipe installation**: Fixed curl-based one-liner installation by auto-detecting piped input, re-executing with TTY for interactive prompts, and running bootstrap before downloads
9+
10+## [0.1.0] - 2025-10-21
11+
12+### Added
13+- **Post-boot setup**: Dedicated post-boot setup script for first-boot execution
14+- **archup-cli integration**: Added archup-cli installation to first-boot sequence
15+- **archup-cli builder**: Download and install archup-cli from latest GitHub release during installation
16+
17+### Changed
18+- **Helper script refactoring**: Updated helper scripts for improved architecture
19+- **Build system**: Updated Makefile to remove preset paths and add post-boot paths
20+- **AUR helpers**: Consolidated AUR helpers into single unified aur.sh script
21+- **Installer simplification**: Simplified install.sh to use download helper and remove redundant preset logic
22+
23+### Fixed
24+- Post-install workflow: Removed duplicate post-boot setup logic from snapper script
25+- Installation sequence: Properly integrated post-boot-setup into main installation flow
@@ -0,0 +1,25 @@
1+# Changelog
2+
3+All notable changes to this project will be documented in this file.
4+
5+## [Unreleased]
6+
7+### Fixed
8+- **Curl-pipe installation**: Fixed curl-based one-liner installation by auto-detecting piped input, re-executing with TTY for interactive prompts, and running bootstrap before downloads
9+
10+## [0.1.0] - 2025-10-21
11+
12+### Added
13+- **Post-boot setup**: Dedicated post-boot setup script for first-boot execution
14+- **archup-cli integration**: Added archup-cli installation to first-boot sequence
15+- **archup-cli builder**: Download and install archup-cli from latest GitHub release during installation
16+
17+### Changed
18+- **Helper script refactoring**: Updated helper scripts for improved architecture
19+- **Build system**: Updated Makefile to remove preset paths and add post-boot paths
20+- **AUR helpers**: Consolidated AUR helpers into single unified aur.sh script
21+- **Installer simplification**: Simplified install.sh to use download helper and remove redundant preset logic
22+
23+### Fixed
24+- Post-install workflow: Removed duplicate post-boot setup logic from snapper script
25+- Installation sequence: Properly integrated post-boot-setup into main installation flow
M install.sh +24 -7
@@ -4,9 +4,20 @@
44
55 set -eo pipefail
66
7-# Export global paths
7+# Export global paths first (needed for re-exec)
88 export ARCHUP_PATH="${ARCHUP_PATH:-$HOME/.local/share/archup}"
99 export ARCHUP_INSTALL="$ARCHUP_PATH/install"
10+
11+# If stdin is not a TTY (piped from curl), save and re-exec with TTY
12+if [ ! -t 0 ]; then
13+ # Save script to proper location
14+ mkdir -p "$ARCHUP_PATH"
15+ INSTALL_SCRIPT="$ARCHUP_PATH/install.sh"
16+ cat > "$INSTALL_SCRIPT"
17+ chmod +x "$INSTALL_SCRIPT"
18+ # Re-exec with TTY connected
19+ exec < /dev/tty "$INSTALL_SCRIPT" "$@"
20+fi
1021 export ARCHUP_INSTALL_LOG_FILE="/var/log/archup-install.log"
1122 export ARCHUP_INSTALL_CONFIG="/var/log/archup-install.conf"
1223 export ARCHUP_REPO_URL="${ARCHUP_REPO_URL:-https://github.com/bnema/archup}"
@@ -36,21 +47,27 @@ HELP
3647 exit 0
3748 fi
3849
39-# Download installer files if not present (for curl-based installation)
50+# Bootstrap FIRST: Install gum and jq (required for download script)
4051 if [ ! -d "$ARCHUP_INSTALL" ]; then
41- # Download the download helper first
52+ # First time running from curl, need to download bootstrap
53+ mkdir -p "$ARCHUP_INSTALL"
54+ curl -sL "$ARCHUP_RAW_URL/install/bootstrap.sh" -o "$ARCHUP_INSTALL/bootstrap.sh"
55+ chmod +x "$ARCHUP_INSTALL/bootstrap.sh"
56+fi
57+source "$ARCHUP_INSTALL/bootstrap.sh"
58+
59+# Download installer files if not present (for curl-based installation)
60+if [ ! -f "$ARCHUP_INSTALL/helpers/all.sh" ]; then
61+ # Download the download helper
4262 mkdir -p "$ARCHUP_INSTALL/helpers"
4363 curl -sL "$ARCHUP_RAW_URL/install/helpers/download.sh" -o "$ARCHUP_INSTALL/helpers/download.sh"
4464 chmod +x "$ARCHUP_INSTALL/helpers/download.sh"
4565
46- # Run the download script
66+ # Run the download script (gum is now available)
4767 source "$ARCHUP_INSTALL/helpers/download.sh"
4868 download_archup_files
4969 fi
5070
51-# Bootstrap: Install gum and essential dependencies (plain text, no gum usage)
52-source "$ARCHUP_INSTALL/bootstrap.sh"
53-
5471 # Source all helper utilities (now safe to use gum)
5572 source "$ARCHUP_INSTALL/helpers/all.sh"
5673
@@ -4,9 +4,20 @@
4 4
5 set -eo pipefail5 set -eo pipefail
6 6
7-# Export global paths7+# Export global paths first (needed for re-exec)
8 export ARCHUP_PATH="${ARCHUP_PATH:-$HOME/.local/share/archup}"8 export ARCHUP_PATH="${ARCHUP_PATH:-$HOME/.local/share/archup}"
9 export ARCHUP_INSTALL="$ARCHUP_PATH/install"9 export ARCHUP_INSTALL="$ARCHUP_PATH/install"
10+
11+# If stdin is not a TTY (piped from curl), save and re-exec with TTY
12+if [ ! -t 0 ]; then
13+ # Save script to proper location
14+ mkdir -p "$ARCHUP_PATH"
15+ INSTALL_SCRIPT="$ARCHUP_PATH/install.sh"
16+ cat > "$INSTALL_SCRIPT"
17+ chmod +x "$INSTALL_SCRIPT"
18+ # Re-exec with TTY connected
19+ exec < /dev/tty "$INSTALL_SCRIPT" "$@"
20+fi
10 export ARCHUP_INSTALL_LOG_FILE="/var/log/archup-install.log"21 export ARCHUP_INSTALL_LOG_FILE="/var/log/archup-install.log"
11 export ARCHUP_INSTALL_CONFIG="/var/log/archup-install.conf"22 export ARCHUP_INSTALL_CONFIG="/var/log/archup-install.conf"
12 export ARCHUP_REPO_URL="${ARCHUP_REPO_URL:-https://github.com/bnema/archup}"23 export ARCHUP_REPO_URL="${ARCHUP_REPO_URL:-https://github.com/bnema/archup}"
@@ -36,21 +47,27 @@ HELP
36 exit 047 exit 0
37 fi48 fi
38 49
39-# Download installer files if not present (for curl-based installation)50+# Bootstrap FIRST: Install gum and jq (required for download script)
40 if [ ! -d "$ARCHUP_INSTALL" ]; then51 if [ ! -d "$ARCHUP_INSTALL" ]; then
41- # Download the download helper first52+ # First time running from curl, need to download bootstrap
53+ mkdir -p "$ARCHUP_INSTALL"
54+ curl -sL "$ARCHUP_RAW_URL/install/bootstrap.sh" -o "$ARCHUP_INSTALL/bootstrap.sh"
55+ chmod +x "$ARCHUP_INSTALL/bootstrap.sh"
56+fi
57+source "$ARCHUP_INSTALL/bootstrap.sh"
58+
59+# Download installer files if not present (for curl-based installation)
60+if [ ! -f "$ARCHUP_INSTALL/helpers/all.sh" ]; then
61+ # Download the download helper
42 mkdir -p "$ARCHUP_INSTALL/helpers"62 mkdir -p "$ARCHUP_INSTALL/helpers"
43 curl -sL "$ARCHUP_RAW_URL/install/helpers/download.sh" -o "$ARCHUP_INSTALL/helpers/download.sh"63 curl -sL "$ARCHUP_RAW_URL/install/helpers/download.sh" -o "$ARCHUP_INSTALL/helpers/download.sh"
44 chmod +x "$ARCHUP_INSTALL/helpers/download.sh"64 chmod +x "$ARCHUP_INSTALL/helpers/download.sh"
45 65
46- # Run the download script66+ # Run the download script (gum is now available)
47 source "$ARCHUP_INSTALL/helpers/download.sh"67 source "$ARCHUP_INSTALL/helpers/download.sh"
48 download_archup_files68 download_archup_files
49 fi69 fi
50 70
51-# Bootstrap: Install gum and essential dependencies (plain text, no gum usage)
52-source "$ARCHUP_INSTALL/bootstrap.sh"
53-
54 # Source all helper utilities (now safe to use gum)71 # Source all helper utilities (now safe to use gum)
55 source "$ARCHUP_INSTALL/helpers/all.sh"72 source "$ARCHUP_INSTALL/helpers/all.sh"
56 73
M install/helpers/download.sh +6 -12
@@ -7,11 +7,9 @@ download_section() {
77 shift 2
88 local files=("$@")
99
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- "
10+ for file in "${files[@]}"; do
11+ curl -sL "$GITHUB_RAW/install/$target_dir/$file" -o "$ARCHUP_INSTALL/$target_dir/$file" 2>/dev/null
12+ done
1513 gum style --foreground 2 "[OK] ${title/Downloading /Downloaded }"
1614 }
1715
@@ -26,10 +24,8 @@ download_archup_files() {
2624 mkdir -p "$ARCHUP_INSTALL"/{helpers,preflight,partitioning,base,config,boot,repos,post-install,post-boot}
2725
2826 # 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- "
27+ curl -sL "$GITHUB_RAW/install/bootstrap.sh" -o "$ARCHUP_INSTALL/bootstrap.sh" 2>/dev/null
28+ curl -sL "$GITHUB_RAW/logo.txt" -o "$ARCHUP_PATH/logo.txt" 2>/dev/null
3329 gum style --foreground 2 "[OK] Core files downloaded"
3430
3531 # Helpers
@@ -69,9 +65,7 @@ download_archup_files() {
6965 all.sh snapper.sh ssh-keygen.sh archup-cli.sh archup-first-boot.service
7066
7167 # 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- "
68+ curl -sL "$GITHUB_RAW/install/base.packages" -o "$ARCHUP_INSTALL/base.packages" 2>/dev/null
7569 gum style --foreground 2 "[OK] Package list downloaded"
7670
7771 echo ""
@@ -7,11 +7,9 @@ download_section() {
7 shift 27 shift 2
8 local files=("$@")8 local files=("$@")
9 9
10- gum spin --spinner dot --title "$title" -- bash -c "10+ for file in "${files[@]}"; do
11- for file in ${files[*]}; do11+ curl -sL "$GITHUB_RAW/install/$target_dir/$file" -o "$ARCHUP_INSTALL/$target_dir/$file" 2>/dev/null
12- curl -sL '$GITHUB_RAW/install/$target_dir/\$file' -o '$ARCHUP_INSTALL/$target_dir/\$file' 2>/dev/null12+ done
13- done
14- "
15 gum style --foreground 2 "[OK] ${title/Downloading /Downloaded }"13 gum style --foreground 2 "[OK] ${title/Downloading /Downloaded }"
16 }14 }
17 15
@@ -26,10 +24,8 @@ download_archup_files() {
26 mkdir -p "$ARCHUP_INSTALL"/{helpers,preflight,partitioning,base,config,boot,repos,post-install,post-boot}24 mkdir -p "$ARCHUP_INSTALL"/{helpers,preflight,partitioning,base,config,boot,repos,post-install,post-boot}
27 25
28 # Core files26 # Core files
29- gum spin --spinner dot --title "Downloading core files..." -- bash -c "27+ curl -sL "$GITHUB_RAW/install/bootstrap.sh" -o "$ARCHUP_INSTALL/bootstrap.sh" 2>/dev/null
30- curl -sL '$GITHUB_RAW/install/bootstrap.sh' -o '$ARCHUP_INSTALL/bootstrap.sh' 2>/dev/null28+ curl -sL "$GITHUB_RAW/logo.txt" -o "$ARCHUP_PATH/logo.txt" 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"29 gum style --foreground 2 "[OK] Core files downloaded"
34 30
35 # Helpers31 # Helpers
@@ -69,9 +65,7 @@ download_archup_files() {
69 all.sh snapper.sh ssh-keygen.sh archup-cli.sh archup-first-boot.service65 all.sh snapper.sh ssh-keygen.sh archup-cli.sh archup-first-boot.service
70 66
71 # Base packages67 # Base packages
72- gum spin --spinner dot --title "Downloading package list..." -- bash -c "68+ curl -sL "$GITHUB_RAW/install/base.packages" -o "$ARCHUP_INSTALL/base.packages" 2>/dev/null
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"69 gum style --foreground 2 "[OK] Package list downloaded"
76 70
77 echo ""71 echo ""

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