detached 6af0a61

install.sh RawHistoryFolder

1#!/bin/bash
2# ArchUp Installer Bootstrap
3# Downloads the ArchUp binary from GitHub Releases and launches the installer.
4#
5# Usage:
6#   curl -fsSL https://archup.run/install | bash
7#   curl -fsSL https://archup.run/install | bash -s -- --dev
8#   curl -fsSL https://archup.run/install | bash -s -- --version v0.5.0
9
10set -e
11
12# Parse arguments
13DEV_MODE=false
14SPECIFIC_VERSION=""
15
16while [[ $# -gt 0 ]]; do
17    case $1 in
18        --dev)
19            DEV_MODE=true
20            shift
21            ;;
22        --version)
23            SPECIFIC_VERSION="$2"
24            shift 2
25            ;;
26        *)
27            echo "Unknown option: $1"
28            echo "Usage: $0 [--dev] [--version VERSION]"
29            exit 1
30            ;;
31    esac
32done
33
34RED='\033[0;31m'
35GREEN='\033[0;32m'
36BLUE='\033[0;34m'
37YELLOW='\033[0;33m'
38NC='\033[0m'
39
40info()    { echo -e "${BLUE}[INFO]${NC} $1"; }
41success() { echo -e "${GREEN}[OK]${NC} $1"; }
42warning() { echo -e "${YELLOW}[WARN]${NC} $1"; }
43error()   { echo -e "${RED}[ERROR]${NC} $1"; exit 1; }
44
45# Preflight checks
46info "Checking system requirements..."
47
48if [ ! -f /etc/arch-release ]; then
49    error "Must be run from the Arch Linux ISO"
50fi
51success "Arch Linux detected"
52
53if [ ! -d /sys/firmware/efi ]; then
54    error "UEFI mode required (legacy BIOS not supported)"
55fi
56success "UEFI mode detected"
57
58ARCH=$(uname -m)
59if [ "$ARCH" != "x86_64" ]; then
60    error "Only x86_64 is supported (detected: $ARCH)"
61fi
62success "Architecture: $ARCH"
63
64REPO_OWNER="bnema"
65REPO_NAME="archup"
66BINARY_NAME="archup"
67
68# Resolve version to download
69if [ -n "$SPECIFIC_VERSION" ]; then
70    LATEST_TAG="$SPECIFIC_VERSION"
71    info "Using version: $LATEST_TAG"
72elif [ "$DEV_MODE" = true ]; then
73    warning "Dev mode: fetching latest pre-release..."
74    LATEST_TAG=$(curl -s "https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases" \
75        | grep -B 10 '"prerelease": true' \
76        | grep '"tag_name":' \
77        | head -n 1 \
78        | sed -E 's/.*"([^"]+)".*/\1/')
79    [ -z "$LATEST_TAG" ] && error "Failed to fetch latest pre-release"
80    warning "Pre-release: $LATEST_TAG"
81else
82    info "Fetching latest stable release..."
83    LATEST_TAG=$(curl -s "https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases/latest" \
84        | grep '"tag_name":' \
85        | sed -E 's/.*"([^"]+)".*/\1/')
86    [ -z "$LATEST_TAG" ] && error "Failed to fetch latest release"
87    success "Version: $LATEST_TAG"
88fi
89
90BINARY_URL="https://github.com/$REPO_OWNER/$REPO_NAME/releases/download/$LATEST_TAG/$BINARY_NAME"
91CHECKSUM_URL="https://github.com/$REPO_OWNER/$REPO_NAME/releases/download/$LATEST_TAG/checksums.txt"
92BINARY_PATH="/tmp/$BINARY_NAME"
93CHECKSUM_PATH="/tmp/archup-checksums.txt"
94
95info "Downloading binary..."
96curl -fsSL "$BINARY_URL" -o "$BINARY_PATH" || error "Failed to download binary from $BINARY_URL"
97success "Binary downloaded"
98
99info "Verifying checksum..."
100curl -fsSL "$CHECKSUM_URL" -o "$CHECKSUM_PATH" || error "Failed to download checksums"
101cd /tmp
102sha256sum -c "$CHECKSUM_PATH" --ignore-missing 2>/dev/null || error "Checksum verification failed"
103success "Checksum verified"
104
105chmod +x "$BINARY_PATH"
106
107info "Launching ArchUp..."
108echo ""
109exec "$BINARY_PATH" install

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