detached 488d011

feat(install): add install.sh for curl-based installation

commit
488d01112cb6b9c302727e752335d2eb4f80e770
author
bnema · · 2026-01-24 19:48 UTC
parent
ae3a77a
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +104 -0
A install.sh +104 -0
@@ -0,0 +1,104 @@
1+#!/bin/sh
2+set -e
3+
4+# Dumber installer script
5+# Usage: curl -fsSL https://dumber.bnema.dev/install | bash
6+
7+REPO="bnema/dumber"
8+
9+# Prefer ~/.local/bin if it exists, otherwise /usr/local/bin
10+if [ -d "$HOME/.local/bin" ]; then
11+ INSTALL_DIR="$HOME/.local/bin"
12+else
13+ INSTALL_DIR="/usr/local/bin"
14+fi
15+
16+echo "Installing Dumber..."
17+
18+# Check OS
19+OS=$(uname -s | tr '[:upper:]' '[:lower:]')
20+if [ "$OS" != "linux" ]; then
21+ echo "Error: Only Linux is supported. Detected: $OS"
22+ exit 1
23+fi
24+
25+# Check architecture
26+ARCH=$(uname -m)
27+if [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "amd64" ]; then
28+ echo "Error: Only x86_64 is supported. Detected: $ARCH"
29+ exit 1
30+fi
31+
32+echo "Detected: linux/x86_64"
33+
34+TARBALL="dumber_linux_x86_64.tar.gz"
35+DOWNLOAD_URL="https://github.com/${REPO}/releases/latest/download/${TARBALL}"
36+
37+# Create temporary directory
38+TMP_DIR=$(mktemp -d)
39+trap 'rm -rf "$TMP_DIR"' EXIT
40+
41+# Download checksums file
42+CHECKSUMS_URL="https://github.com/${REPO}/releases/latest/download/checksums.txt"
43+echo "Downloading checksums..."
44+if ! curl -fsSL "$CHECKSUMS_URL" -o "$TMP_DIR/checksums.txt"; then
45+ echo "Error: Failed to download checksums file"
46+ exit 1
47+fi
48+
49+echo "Downloading ${TARBALL}..."
50+if ! curl -fsSL "$DOWNLOAD_URL" -o "$TMP_DIR/$TARBALL"; then
51+ echo "Error: Failed to download ${TARBALL}"
52+ exit 1
53+fi
54+
55+# Verify checksum
56+echo "Verifying checksum..."
57+EXPECTED_CHECKSUM=$(grep -E "[[:space:]]${TARBALL}\$" "$TMP_DIR/checksums.txt" | awk '{print $1}')
58+if [ -z "$EXPECTED_CHECKSUM" ]; then
59+ echo "Error: Could not find checksum for ${TARBALL}"
60+ exit 1
61+fi
62+
63+if command -v sha256sum >/dev/null 2>&1; then
64+ ACTUAL_CHECKSUM=$(sha256sum "$TMP_DIR/$TARBALL" | awk '{print $1}')
65+else
66+ echo "Error: sha256sum not found"
67+ exit 1
68+fi
69+
70+if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then
71+ echo "Error: Checksum verification failed!"
72+ echo "Expected: $EXPECTED_CHECKSUM"
73+ echo "Actual: $ACTUAL_CHECKSUM"
74+ exit 1
75+fi
76+echo "Checksum verified."
77+
78+echo "Extracting..."
79+tar -xzf "$TMP_DIR/$TARBALL" -C "$TMP_DIR"
80+
81+# Find the dumber binary (handles versioned subdirectory)
82+BINARY=$(find "$TMP_DIR" -name "dumber" -type f -executable | head -1)
83+if [ -z "$BINARY" ]; then
84+ echo "Error: Could not find dumber binary in archive"
85+ exit 1
86+fi
87+
88+echo "Installing to ${INSTALL_DIR}..."
89+if [ -w "$INSTALL_DIR" ]; then
90+ mv "$BINARY" "$INSTALL_DIR/dumber"
91+else
92+ echo "sudo required to install to ${INSTALL_DIR}"
93+ sudo mv "$BINARY" "$INSTALL_DIR/dumber"
94+fi
95+
96+# Verify installation
97+if command -v dumber >/dev/null 2>&1; then
98+ echo ""
99+ echo "Dumber installed successfully!"
100+ dumber about
101+else
102+ echo ""
103+ echo "Installation complete. Add ${INSTALL_DIR} to your PATH if needed."
104+fi
@@ -0,0 +1,104 @@
1+#!/bin/sh
2+set -e
3+
4+# Dumber installer script
5+# Usage: curl -fsSL https://dumber.bnema.dev/install | bash
6+
7+REPO="bnema/dumber"
8+
9+# Prefer ~/.local/bin if it exists, otherwise /usr/local/bin
10+if [ -d "$HOME/.local/bin" ]; then
11+ INSTALL_DIR="$HOME/.local/bin"
12+else
13+ INSTALL_DIR="/usr/local/bin"
14+fi
15+
16+echo "Installing Dumber..."
17+
18+# Check OS
19+OS=$(uname -s | tr '[:upper:]' '[:lower:]')
20+if [ "$OS" != "linux" ]; then
21+ echo "Error: Only Linux is supported. Detected: $OS"
22+ exit 1
23+fi
24+
25+# Check architecture
26+ARCH=$(uname -m)
27+if [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "amd64" ]; then
28+ echo "Error: Only x86_64 is supported. Detected: $ARCH"
29+ exit 1
30+fi
31+
32+echo "Detected: linux/x86_64"
33+
34+TARBALL="dumber_linux_x86_64.tar.gz"
35+DOWNLOAD_URL="https://github.com/${REPO}/releases/latest/download/${TARBALL}"
36+
37+# Create temporary directory
38+TMP_DIR=$(mktemp -d)
39+trap 'rm -rf "$TMP_DIR"' EXIT
40+
41+# Download checksums file
42+CHECKSUMS_URL="https://github.com/${REPO}/releases/latest/download/checksums.txt"
43+echo "Downloading checksums..."
44+if ! curl -fsSL "$CHECKSUMS_URL" -o "$TMP_DIR/checksums.txt"; then
45+ echo "Error: Failed to download checksums file"
46+ exit 1
47+fi
48+
49+echo "Downloading ${TARBALL}..."
50+if ! curl -fsSL "$DOWNLOAD_URL" -o "$TMP_DIR/$TARBALL"; then
51+ echo "Error: Failed to download ${TARBALL}"
52+ exit 1
53+fi
54+
55+# Verify checksum
56+echo "Verifying checksum..."
57+EXPECTED_CHECKSUM=$(grep -E "[[:space:]]${TARBALL}\$" "$TMP_DIR/checksums.txt" | awk '{print $1}')
58+if [ -z "$EXPECTED_CHECKSUM" ]; then
59+ echo "Error: Could not find checksum for ${TARBALL}"
60+ exit 1
61+fi
62+
63+if command -v sha256sum >/dev/null 2>&1; then
64+ ACTUAL_CHECKSUM=$(sha256sum "$TMP_DIR/$TARBALL" | awk '{print $1}')
65+else
66+ echo "Error: sha256sum not found"
67+ exit 1
68+fi
69+
70+if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then
71+ echo "Error: Checksum verification failed!"
72+ echo "Expected: $EXPECTED_CHECKSUM"
73+ echo "Actual: $ACTUAL_CHECKSUM"
74+ exit 1
75+fi
76+echo "Checksum verified."
77+
78+echo "Extracting..."
79+tar -xzf "$TMP_DIR/$TARBALL" -C "$TMP_DIR"
80+
81+# Find the dumber binary (handles versioned subdirectory)
82+BINARY=$(find "$TMP_DIR" -name "dumber" -type f -executable | head -1)
83+if [ -z "$BINARY" ]; then
84+ echo "Error: Could not find dumber binary in archive"
85+ exit 1
86+fi
87+
88+echo "Installing to ${INSTALL_DIR}..."
89+if [ -w "$INSTALL_DIR" ]; then
90+ mv "$BINARY" "$INSTALL_DIR/dumber"
91+else
92+ echo "sudo required to install to ${INSTALL_DIR}"
93+ sudo mv "$BINARY" "$INSTALL_DIR/dumber"
94+fi
95+
96+# Verify installation
97+if command -v dumber >/dev/null 2>&1; then
98+ echo ""
99+ echo "Dumber installed successfully!"
100+ dumber about
101+else
102+ echo ""
103+ echo "Installation complete. Add ${INSTALL_DIR} to your PATH if needed."
104+fi

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 8

Tags 42

↑↓ moveenter openesc close