Add docopts arm64 version for macOS

This commit is contained in:
T. R. Bernstein
2024-07-02 04:21:33 +02:00
committed by T. R. Bernstein
parent 139501de16
commit 9ec150ba10
2 changed files with 7 additions and 16 deletions

View File

@@ -97,7 +97,9 @@ function ensureCommandLineTools() {
function ensureDocopts() {
which docopts > /dev/null && return
local fileURL="${DOCOPTS_URL:-https://github.com/astzweig/docopts/releases/download/v.0.7.0/docopts_darwin_amd64}"
local defaultURL="https://github.com/astzweig/docopts/releases/download/v.0.7.0/docopts_darwin_amd64"
[[ $(uname -m) == arm64 ]] && defaultURL="https://github.com/astzweig/docopts/releases/download/v.0.7.0/docopts_darwin_arm64"
local fileURL="${DOCOPTS_URL:-${defaultURL}}"
curl --output ./docopts -fsSL "${fileURL}" || return
chmod u+x ./docopts
PATH="${PATH}:`pwd`"