Benign linux Download

uv-installer.sh

AArch64 (ARM64) architecture stringBase64 text contains ELF header prefix

Evidence

HTTP or HTTPS URL reference lines 1–10
1#!/bin/sh
2# shellcheck shell=dash
3# shellcheck disable=SC2039 # local is non-POSIX
4#
5# Licensed under the MIT license
6# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
7# option. This file may not be copied, modified, or distributed
8# except according to those terms.
9
10# This runs on Un …
References a release download URL path lines 17–53
17:26… SC2034 # deliberately unused
18 local _has_local
19}
20
21has_local 2>/dev/null || alias local=typeset
22
23set -u
24
25APP_NAME="uv"
26APP_VERSION="0.10.4"
27# Look for GitHub Enterprise-style base URL first
28if [ -n "${UV_INSTALLER_GHE_BASE_URL:-}" ]; then
29 INSTALLER_BASE_URL="$UV_INSTALLER_GHE_BASE_URL"
30else
31 INSTALLER_BASE_URL="${UV_INSTALLER_GITHUB_BASE_URL:-https://github.com}"
32fi
33if [ -n "${UV_DOWNLOAD_URL:-}" ]; then
34 ARTIFACT_DOWNLOAD_URL="$UV_DOWNLOAD_URL"
35elif [ -n "${INSTALLER_DOWNLOAD_URL:-}" ]; then
36 ARTIFACT_DOWNLOAD_URL="$INSTALLER_DOWNLOAD_URL"
37else
38 ARTIFACT_DOWNLOAD_URL="${INSTALLER_BASE_URL}/astral-sh/uv/releases/download/0.10.4"
39fi
40if [ -n "${UV_PRINT_VERBOSE:-}" ]; then
41 PRINT_VERBOSE="$UV_PRINT_VERBOSE"
42else
43 PRINT_VERBOSE=${INSTALLER_PRINT_VERBOSE:-0}
44fi
45if [ -n "${UV_PRINT_QUIET:-}" ]; then
46 PRINT_QUIET="$UV_PRINT_QUIET"
47else
48 PRINT_QUIET=${INSTALLER_PRINT_QUIET:-0}
49fi
50if [ -n "${UV_NO_MODIFY_PATH:-}" ]; then
51 NO_MODIFY_PATH="$UV_NO_MODIFY_PATH"
52else
53 …
Assigns AUTH or TOKEN named shell variable lines 61–68
61:22… INSTALL}" ]; then
62 NO_MODIFY_PATH=1
63 INSTALL_UPDATER=0
64fi
65AUTH_TOKEN="${UV_GITHUB_TOKEN:-}"
66
67read -r RECEIPT <<EORECEIPT
68{"binaries":["CARGO_DIST_BINS"],"binary_aliases":{},"cdylibs":["CARGO_DIST_DYLIBS"],"cstaticlibs": …
GitHub release asset URL or base template lines 90–116
90:8… getent passwd "$(id -un)" | cut -d: -f6
91 fi
92}
93INFERRED_HOME=$(get_home)
94# shellcheck disable=SC2034
95INFERRED_HOME_EXPRESSION=$(get_home_expression)
96RECEIPT_HOME="${XDG_CONFIG_HOME:-$INFERRED_HOME/.config}/uv"
97
98usage() {
99 # print help (this cat/EOF stuff is a "heredoc" string)
100 cat <<EOF
101uv-installer.sh
102
103The installer for uv 0.10.4
104
105This script detects what platform you're on and fetches an appropriate archive from
106https://github.com/astral-sh/uv/releases/download/0.10.4
107then unpacks the binaries and installs them to the first of the following locations
108
109 \$XDG_BIN_HOME
110 \$XDG_DATA_HOME/../bin
111 \$HOME/.local/bin
112
113It will then add that dir to PATH by adding the appropriate line to your shell profiles.
114
115USAGE:
116 uv-installer.sh [ …
For/foreach loop over a collection lines 138–153
138:2… need_cmd mkdir
139 need_cmd rm
140 need_cmd tar
141 need_cmd grep
142 need_cmd cat
143
144 for arg in "$@"; do
145 case "$arg" in
146 --help)
147 usage
148 exit 0
149 ;;
150 --quiet)
151 PRINT_QUIET=1
152 ;;
153 …

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.