GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — wiremap/install.sh at main · codeofmario/wiremap

Expand file tree

/

install.sh

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
49 lines (40 loc) · 1.61 KB
/

install.sh

Copy path

File metadata and controls

49 lines (40 loc) · 1.61 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
set -e
REPO="codeofmario/wiremap"
INSTALL_DIR="/usr/local/bin"
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m)
case "$ARCH" in
x86_64) ARCH="amd64" ;;
aarch64|arm64) ARCH="arm64" ;;
*) echo "Unsupported architecture: $ARCH"; exit 1 ;;
esac
LATEST=$(curl -sL -o /dev/null -w '%{url_effective}' "https://github.com/$REPO/releases/latest" | sed 's|.*/tag/||')
if [ -z "$LATEST" ]; then
echo "Error: failed to fetch latest release version"; exit 1
fi
if ! echo "$LATEST" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+'; then
echo "Error: invalid version format: $LATEST"; exit 1
fi
TARBALL="wiremap_${OS}_${ARCH}.tar.gz"
URL="https://github.com/$REPO/releases/download/${LATEST}/${TARBALL}"
CHECKSUM_URL="https://github.com/$REPO/releases/download/${LATEST}/checksums.txt"
TMPDIR=$(mktemp -d)
trap 'rm -rf "$TMPDIR"' EXIT
echo "Downloading wiremap $LATEST for ${OS}/${ARCH}..."
curl -sL "$URL" -o "$TMPDIR/$TARBALL"
curl -sL "$CHECKSUM_URL" -o "$TMPDIR/checksums.txt" 2>/dev/null || true
if [ -f "$TMPDIR/checksums.txt" ] && grep -q "$TARBALL" "$TMPDIR/checksums.txt"; then
echo "Verifying checksum..."
EXPECTED=$(grep "$TARBALL" "$TMPDIR/checksums.txt" | awk '{print $1}')
ACTUAL=$(sha256sum "$TMPDIR/$TARBALL" | awk '{print $1}')
if [ "$EXPECTED" != "$ACTUAL" ]; then
echo "Error: checksum mismatch (expected $EXPECTED, got $ACTUAL)"; exit 1
fi
echo "Checksum verified."
else
echo "Warning: checksum file not available, skipping verification."
fi
tar xz -C "$TMPDIR" -f "$TMPDIR/$TARBALL" wiremap
sudo install "$TMPDIR/wiremap" "$INSTALL_DIR/wiremap"
echo "wiremap installed to $INSTALL_DIR/wiremap"
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.