detached 1e96984

feat(bootstrap): add installer download and execution script for automated deployment

commit
1e96984d9d54a05e338611c46c2421b793dcdf92
author
bnema · · 2025-10-26 09:42 UTC
parent
c6247a6
signature
unsigned
1 file · +77 -0
A install-bin.sh +77 -0
@@ -0,0 +1,77 @@
1+#!/bin/bash
2+# ArchUp Installer Bootstrap Script
3+# Downloads and runs the ArchUp Go installer
4+
5+set -e
6+
7+# Colors for output
8+RED='\033[0;31m'
9+GREEN='\033[0;32m'
10+BLUE='\033[0;34m'
11+NC='\033[0m' # No Color
12+
13+info() {
14+ echo -e "${BLUE}[INFO]${NC} $1"
15+}
16+
17+success() {
18+ echo -e "${GREEN}[OK]${NC} $1"
19+}
20+
21+error() {
22+ echo -e "${RED}[ERROR]${NC} $1"
23+ exit 1
24+}
25+
26+# Check if running on Arch Linux
27+info "Checking system requirements..."
28+if [ ! -f /etc/arch-release ]; then
29+ error "This installer must be run on Arch Linux ISO"
30+fi
31+success "Running on Arch Linux"
32+
33+# Check for UEFI mode
34+if [ ! -d /sys/firmware/efi ]; then
35+ error "UEFI mode required (legacy BIOS not supported)"
36+fi
37+success "UEFI mode detected"
38+
39+# Check architecture
40+ARCH=$(uname -m)
41+if [ "$ARCH" != "x86_64" ]; then
42+ error "Only x86_64 architecture is supported (detected: $ARCH)"
43+fi
44+success "Architecture: $ARCH"
45+
46+# GitHub repository details
47+REPO_OWNER="bnema"
48+REPO_NAME="archup"
49+BINARY_NAME="archup-installer"
50+
51+# Download latest release
52+info "Fetching latest release information..."
53+LATEST_RELEASE_URL="https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases/latest"
54+LATEST_TAG=$(curl -s "$LATEST_RELEASE_URL" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
55+
56+if [ -z "$LATEST_TAG" ]; then
57+ error "Failed to fetch latest release tag"
58+fi
59+success "Latest version: $LATEST_TAG"
60+
61+# Download binary
62+BINARY_URL="https://github.com/$REPO_OWNER/$REPO_NAME/releases/download/$LATEST_TAG/$BINARY_NAME"
63+BINARY_PATH="/tmp/$BINARY_NAME"
64+
65+info "Downloading installer binary..."
66+if ! curl -fsSL "$BINARY_URL" -o "$BINARY_PATH"; then
67+ error "Failed to download installer binary from $BINARY_URL"
68+fi
69+success "Binary downloaded"
70+
71+# Make executable
72+chmod +x "$BINARY_PATH"
73+
74+# Run installer
75+info "Launching ArchUp installer..."
76+echo ""
77+exec "$BINARY_PATH"
@@ -0,0 +1,77 @@
1+#!/bin/bash
2+# ArchUp Installer Bootstrap Script
3+# Downloads and runs the ArchUp Go installer
4+
5+set -e
6+
7+# Colors for output
8+RED='\033[0;31m'
9+GREEN='\033[0;32m'
10+BLUE='\033[0;34m'
11+NC='\033[0m' # No Color
12+
13+info() {
14+ echo -e "${BLUE}[INFO]${NC} $1"
15+}
16+
17+success() {
18+ echo -e "${GREEN}[OK]${NC} $1"
19+}
20+
21+error() {
22+ echo -e "${RED}[ERROR]${NC} $1"
23+ exit 1
24+}
25+
26+# Check if running on Arch Linux
27+info "Checking system requirements..."
28+if [ ! -f /etc/arch-release ]; then
29+ error "This installer must be run on Arch Linux ISO"
30+fi
31+success "Running on Arch Linux"
32+
33+# Check for UEFI mode
34+if [ ! -d /sys/firmware/efi ]; then
35+ error "UEFI mode required (legacy BIOS not supported)"
36+fi
37+success "UEFI mode detected"
38+
39+# Check architecture
40+ARCH=$(uname -m)
41+if [ "$ARCH" != "x86_64" ]; then
42+ error "Only x86_64 architecture is supported (detected: $ARCH)"
43+fi
44+success "Architecture: $ARCH"
45+
46+# GitHub repository details
47+REPO_OWNER="bnema"
48+REPO_NAME="archup"
49+BINARY_NAME="archup-installer"
50+
51+# Download latest release
52+info "Fetching latest release information..."
53+LATEST_RELEASE_URL="https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases/latest"
54+LATEST_TAG=$(curl -s "$LATEST_RELEASE_URL" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
55+
56+if [ -z "$LATEST_TAG" ]; then
57+ error "Failed to fetch latest release tag"
58+fi
59+success "Latest version: $LATEST_TAG"
60+
61+# Download binary
62+BINARY_URL="https://github.com/$REPO_OWNER/$REPO_NAME/releases/download/$LATEST_TAG/$BINARY_NAME"
63+BINARY_PATH="/tmp/$BINARY_NAME"
64+
65+info "Downloading installer binary..."
66+if ! curl -fsSL "$BINARY_URL" -o "$BINARY_PATH"; then
67+ error "Failed to download installer binary from $BINARY_URL"
68+fi
69+success "Binary downloaded"
70+
71+# Make executable
72+chmod +x "$BINARY_PATH"
73+
74+# Run installer
75+info "Launching ArchUp installer..."
76+echo ""
77+exec "$BINARY_PATH"

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