Benign linux Download

install.sh

AArch64 (ARM64) architecture stringReferences curl flags and HTTP URL

Evidence

Usage: help text marker lines 9–20
⋯4 lines
13Steward Installer
14
15Usage: install.sh [options]
16
17Options:
18 -h, --help Display this help message
19 -v, --version <version> Install a specific version (e.g., 0.1.0)
20 -b, --bin …
Text contains curl-to-shell or Node pipeline lines 20–51
20:78… g
21 --no-modify-path Don't modify shell config files (.zshrc, .bashrc, etc.)
22
23Examples:
24 curl -fsSL https://raw.githubusercontent.com/sapirrior/steward/main/installer/install.sh | bash
25 curl -fsSL https://raw.githubusercontent.com/sapirrior/steward/main/installer/install.sh | bash -s -- --version 0.1.0
26 ./install.sh --binary /path/to/steward
27EOF
28}
29
30requested_version=${VERSION:-}
31no_modify_path=false
32binary_path=""
33
34while [[ $# -gt 0 ]]; do
35 case "$1" in
36 -h|--help)
37 usage
38 exit 0
39 ;;
40 -v|--version)
41 if [[ -n "${2:-}" ]]; then
42 requested_version="$2"
43 shift 2
44 else
45 echo -e "${RED}Error: --version requires a version argument${NC}"
46 exit 1
47 fi
48 ;;
49 -b|--binary)
50 if [[ -n "${2:-}" ]]; then
51 …
PREFIX build variable reference lines 64–84
64:12… shift
65 ;;
66 esac
67done
68
69# Detect Termux vs default ~/.steward/bin
70is_termux=false
71if [ -n "${PREFIX:-}" ] && [ -d "${PREFIX}/bin" ]; then
72 is_termux=true
73 INSTALL_DIR="${PREFIX}/bin"
74 SHARE_DIR="${PREFIX}/share/$APP"
75else
76 INSTALL_DIR=$HOME/.steward/bin
77 SHARE_DIR=$HOME/.steward/share
78fi
⋯6 lines
AArch64 (ARM64) architecture string lines 86–119
86:4… exit 1
87 fi
88 specific_version="local"
89else
90 raw_os=$(uname -s)
91 os=$(echo "$raw_os" | tr '[:upper:]' '[:lower:]')
92 case "$raw_os" in
93 Darwin*) os="darwin" ;;
94 Linux*) os="linux" ;;
95 MINGW*|MSYS*|CYGWIN*) os="windows" ;;
96 esac
97
98 arch=$(uname -m)
99 if [[ "$arch" == "aarch64" ]]; then
100 arch="arm64"
101 fi
102 if [[ "$arch" == "x86_64" ]]; then
103 arch="x64"
104 fi
105
106 if [ "$os" = "darwin" ] && [ "$arch" = "x64" ]; then
107 rosetta_flag=$(sysctl -n sysctl.proc_translated 2>/dev/null || echo 0)
108 if [ "$rosetta_flag" = "1" ]; then
109 arch="arm64"
110 fi
111 fi
112
113 combo="$os-$arch"
114 case "$combo" in
115 linux-x64|linux-arm64|darwin-x64|darwin-arm64|windows-x64)
116 ;;
117 *)
118 if [ "$is_termux" != "true" ]; then
119 echo -e "${RED}U …
Shell text redirects both output streams lines 122–142
122:7… ;;
123 esac
124
125 archive_ext=".tar.gz"
126 if [ "$os" = "windows" ]; then
127 archive_ext=".zip"
128 fi
129
130 if [ "$is_termux" = "true" ]; then
131 filename="$APP-dist-cli.tar.gz"
132 else
133 filename="$APP-$os-$arch$archive_ext"
134 fi
135
136 if [ "$os" = "windows" ]; then
137 if ! command -v unzip >/dev/null 2>&1; then
138 echo -e "${RED}Error: 'unzip' is required but not installed.${NC}"
139 exit 1
140 fi
141 else
142 if ! command -v tar >/de …

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.