detached 5fea89d

feat: add install script for curl | bash installation

commit
5fea89d79f07ee717bad55155d3bf16a7c8ac7e5
author
brice · · 2026-01-16 05:32 UTC
parent
6db35a4
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +74 -0
A install.sh +74 -0
@@ -0,0 +1,74 @@
1+#!/bin/sh
2+set -e
3+
4+# Gordon installer script
5+# Usage: curl -fsSL https://gordon.bnema.dev/install | bash
6+
7+REPO="bnema/gordon"
8+INSTALL_DIR="/usr/local/bin"
9+
10+echo "Installing Gordon..."
11+
12+# Detect OS
13+OS=$(uname -s | tr '[:upper:]' '[:lower:]')
14+case "$OS" in
15+ linux)
16+ OS="linux"
17+ ;;
18+ darwin)
19+ OS="darwin"
20+ ;;
21+ *)
22+ echo "Error: Unsupported operating system: $OS"
23+ exit 1
24+ ;;
25+esac
26+
27+# Detect architecture
28+ARCH=$(uname -m)
29+case "$ARCH" in
30+ x86_64|amd64)
31+ ARCH="amd64"
32+ ;;
33+ aarch64|arm64)
34+ ARCH="arm64"
35+ ;;
36+ *)
37+ echo "Error: Unsupported architecture: $ARCH"
38+ exit 1
39+ ;;
40+esac
41+
42+echo "Detected: ${OS}/${ARCH}"
43+
44+# Construct download URL
45+TARBALL="gordon_${OS}_${ARCH}.tar.gz"
46+DOWNLOAD_URL="https://github.com/${REPO}/releases/latest/download/${TARBALL}"
47+
48+# Create temporary directory
49+TMP_DIR=$(mktemp -d)
50+trap 'rm -rf "$TMP_DIR"' EXIT
51+
52+echo "Downloading ${TARBALL}..."
53+curl -fsSL "$DOWNLOAD_URL" -o "$TMP_DIR/$TARBALL"
54+
55+echo "Extracting..."
56+tar -xzf "$TMP_DIR/$TARBALL" -C "$TMP_DIR"
57+
58+echo "Installing to ${INSTALL_DIR}..."
59+if [ -w "$INSTALL_DIR" ]; then
60+ mv "$TMP_DIR/gordon" "$INSTALL_DIR/gordon"
61+else
62+ echo "sudo required to install to ${INSTALL_DIR}"
63+ sudo mv "$TMP_DIR/gordon" "$INSTALL_DIR/gordon"
64+fi
65+
66+# Verify installation
67+if command -v gordon >/dev/null 2>&1; then
68+ echo ""
69+ echo "Gordon installed successfully!"
70+ gordon version
71+else
72+ echo ""
73+ echo "Installation complete. You may need to add ${INSTALL_DIR} to your PATH."
74+fi
@@ -0,0 +1,74 @@
1+#!/bin/sh
2+set -e
3+
4+# Gordon installer script
5+# Usage: curl -fsSL https://gordon.bnema.dev/install | bash
6+
7+REPO="bnema/gordon"
8+INSTALL_DIR="/usr/local/bin"
9+
10+echo "Installing Gordon..."
11+
12+# Detect OS
13+OS=$(uname -s | tr '[:upper:]' '[:lower:]')
14+case "$OS" in
15+ linux)
16+ OS="linux"
17+ ;;
18+ darwin)
19+ OS="darwin"
20+ ;;
21+ *)
22+ echo "Error: Unsupported operating system: $OS"
23+ exit 1
24+ ;;
25+esac
26+
27+# Detect architecture
28+ARCH=$(uname -m)
29+case "$ARCH" in
30+ x86_64|amd64)
31+ ARCH="amd64"
32+ ;;
33+ aarch64|arm64)
34+ ARCH="arm64"
35+ ;;
36+ *)
37+ echo "Error: Unsupported architecture: $ARCH"
38+ exit 1
39+ ;;
40+esac
41+
42+echo "Detected: ${OS}/${ARCH}"
43+
44+# Construct download URL
45+TARBALL="gordon_${OS}_${ARCH}.tar.gz"
46+DOWNLOAD_URL="https://github.com/${REPO}/releases/latest/download/${TARBALL}"
47+
48+# Create temporary directory
49+TMP_DIR=$(mktemp -d)
50+trap 'rm -rf "$TMP_DIR"' EXIT
51+
52+echo "Downloading ${TARBALL}..."
53+curl -fsSL "$DOWNLOAD_URL" -o "$TMP_DIR/$TARBALL"
54+
55+echo "Extracting..."
56+tar -xzf "$TMP_DIR/$TARBALL" -C "$TMP_DIR"
57+
58+echo "Installing to ${INSTALL_DIR}..."
59+if [ -w "$INSTALL_DIR" ]; then
60+ mv "$TMP_DIR/gordon" "$INSTALL_DIR/gordon"
61+else
62+ echo "sudo required to install to ${INSTALL_DIR}"
63+ sudo mv "$TMP_DIR/gordon" "$INSTALL_DIR/gordon"
64+fi
65+
66+# Verify installation
67+if command -v gordon >/dev/null 2>&1; then
68+ echo ""
69+ echo "Gordon installed successfully!"
70+ gordon version
71+else
72+ echo ""
73+ echo "Installation complete. You may need to add ${INSTALL_DIR} to your PATH."
74+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 7

Tags 106

↑↓ moveenter openesc close