Benign linux Download

install.sh

AArch64 (ARM64) architecture stringReferences curl flags and HTTP URL

Evidence

References curl flags and HTTP URL lines 1–19
1#!/usr/bin/env bash
2set -euo pipefail
3shopt -s lastpipe 2>/dev/null || true
4umask 022
5
6# CLI Printing Press installer
7#
8# One-line install:
9# curl -fsSL https://raw.githubusercontent.com/mvanhorn/cli-printing-press/main/scripts/install.sh | bash
10#
11# Options:
12# --cli-only Install or update only the Go generator binary.
13# --skills-only Install or refresh only the Printing Press skills.
14# -a, --agent NAME Install skills for an agent supported by `skills`.
15# May be repeated. Defaults to claude-code.
16# --dry-run Print commands without executing them.
17# --quiet Suppress non-error output.
18# --no-gum Disable gum formatting even when gum is installed.
19# -h, --help …
Text contains curl-to-shell or Node pipeline lines 25–63
25:45… -press/skills"
26readonly SKILLS_PACKAGE="skills@latest"
27readonly DEFAULT_AGENT="claude-code"
28
29INSTALL_CLI=1
⋯10 lines
40
41cleanup() {
42 if [[ -n "${LOCK_DIR:-}" && -d "$LOCK_DIR" ]]; then
43 rm -f "$LOCK_DIR/pid" 2>/dev/null || true
44 rmdir "$LOCK_DIR" 2>/dev/null || true
45 fi
46 if [[ -n "${TMP_DIR:-}" && -d "$TMP_DIR" ]]; then
47 rm -rf "$TMP_DIR"
48 fi
49}
50trap cleanup EXIT
51
52usage() {
53 cat <<'USAGE'
54CLI Printing Press installer
55
56Usage:
57 bash scripts/install.sh [options]
58 curl -fsSL https://raw.githubusercontent.com/mvanhorn/cli-printing-press/main/scripts/install.sh | bash
59 curl -fsSL https://raw.githubusercontent.com/mvanhorn/cli-printing-press/main/scripts/install.sh | bash -s -- --cli-only
60
61Options:
62 --cli-only Install or update only the Go generator binary.
63 …
Shell parameter prefix or suffix pattern removal lines 87–118
87:6… -no-gum)
88 NO_GUM=1
89 ;;
90 --agent=*)
91 AGENTS+=("${arg#--agent=}")
92 ;;
93 -a=*)
94 AGENTS+=("${arg#-a=}")
95 ;;
96 -h|--help)
97 usage
98 exit 0
99 ;;
100 *)
101 # Handled below so "-a value" and "--agent value" can consume the next arg.
102 ;;
103 esac
104done
105
106# Re-parse options that consume a following value.
107if (($# > 0)); then
108 while (($# > 0)); do
109 case "$1" in
110 -a|--agent)
111 shift
112 if (($# == 0)); then
113 echo "error: --agent requires a value" >&2
114 exit 1
115 fi
116 AGENTS+=("$1")
117 ;;
118 --cli-only|--skills-only|--dry-run|--quiet|- …
Shell text redirects both output streams lines 134–155
134:34… hen
135 AGENTS=("$DEFAULT_AGENT")
136fi
137
138HAS_GUM=0
139if command -v gum >/dev/null 2>&1 && [[ -t 1 && "$NO_GUM" -eq 0 ]]; then
140 HAS_GUM=1
141fi
142
143info() {
144 [[ "$QUIET" -eq 1 ]] && return 0
145 if [[ "$HAS_GUM" -eq 1 ]]; then
146 gum style --foreground 39 "-> $*"
147 else
148 printf '\033[0;34m->\033[0m %s\n' "$*"
149 fi
150}
⋯5 lines
Shell command-substitution syntax lines 174–195
174:26… \033[0m %s\n' "$*" >&2
175 fi
176}
177
178strip_ansi() {
179 sed -E $'s/\x1B\\[[0-9;]*[A-Za-z]//g'
180}
181
⋯4 lines
186 local width=0
187 local line clean len
188 for line in "${lines[@]}"; do
189 clean="$(printf '%s' "$line" | strip_ansi)"
190 len=${#clean}
191 ((len > width)) && width=$len
⋯4 lines

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.