f2ed9479-863a-404a-b49d-d05c02d6c8da
AArch64 (ARM64) architecture stringShell command-substitution syntax
SHA-25655dd34820c1982744772a73fcda19aa3d38bda350d57c0d90a8e7bdd430cbee1
Evidence
1#!/bin/sh
2# shellcheck shell=dash
3#
4# Licensed under the MIT license
5# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6# option. This file may not be copied, modified, or distributed
7# except according to those terms.
8
9if [ "$KSH_VERSIO …
13:43… h this ksh93 version; please try bash!' >&2
14 exit 1
15fi
16
17set -u
18
19APP_NAME="uv"
20APP_VERSION="0.5.23"
21# Look for GitHub Enterprise-style base URL first
22if [ -n "${UV_INSTALLER_GHE_BASE_URL:-}" ]; then
23 INSTALLER_BASE_URL="$UV_INSTALLER_GHE_BASE_URL"
24else
25 INSTALLER_BASE_URL="${UV_INSTALLER_GITHUB_BASE_URL:-https://github.com}"
26fi
27if [ -n "${INSTALLER_DOWNLOAD_URL:-}" ]; then
28 ARTIFACT_DOWNLOAD_URL="$INSTALLER_DOWNLOAD_URL"
29else
30 ARTIFACT_DOWNLOAD_URL="${INSTALLER_BASE_URL}/astral-sh/uv/releases/download/0.5.23"
31fi
32PRINT_VERBOSE=${INSTALLER_PRINT_VERBOSE:-0}
33PRINT_QUIET=${INSTALLER_PRINT_QUIET:-0}
34if [ -n "${UV_NO_MODIFY_PATH:-}" ]; then
35 NO_MODIFY_PATH="$UV_NO_MODIFY_PATH"
36else
37 NO_MODIFY_PATH=${INSTALLER_NO_MODIFY_PATH:-0}
38fi
39if [ "${UV_DISABLE_UPDATE:-0}" = "1" ]; then
40 INSTALL_UPDATER=0
41else
42 INSTALL_UPDATER=1
43fi
44UNMANAGED_INSTALL="${UV_UN …
51:204… th":true,"provider":{"source":"cargo-dist","version":"0.27.0"},"source":{"app_name":"uv","name":"uv","owner":"astral-sh","release_type":"github"},"version":"0.5.23"}
52EORECEIPT
53RECEIPT_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/uv"
54
55usage() {
56 # print help (this cat/EOF stuff is a "heredoc" string)
57 cat <<EOF
58uv-installer.sh
59
60The installer for uv 0.5.23
61
62This script detects what platform you're on and fetches an appropriate archive from
63https://github.com/astral-sh/uv/releases/download/0.5.23
64then unpacks the binaries and installs them to the first of the following locations
65
66 \$XDG_BIN_HOME
67 \$XDG_DATA_HOME/../bin
68 \$HOME/.local/bin
69
70It will then add that dir to PATH by adding the appropriate line to your shell profiles.
71
72USAGE:
73 uv-installer.sh [ …
95:2… need_cmd mkdir
96 need_cmd rm
97 need_cmd tar
98 need_cmd grep
99 need_cmd cat
100
101 for arg in "$@"; do
102 case "$arg" in
103 --help)
104 usage
105 exit 0
106 ;;
107 --quiet)
108 PRINT_QUIET=1
109 ;;
110 …
116:18… ;
117 *)
118 OPTIND=1
119 if [ "${arg%%--*}" = "" ]; then
120 err "unknown option $arg"
121 fi
122 while getopts :hvq sub_arg "$arg …