Skip to content

Commit

Permalink
Merge pull request #2106 from thaJeztah/update_buildx_install_script
Browse files Browse the repository at this point in the history
hack/install-buildx: allow overriding variables
  • Loading branch information
AkihiroSuda authored May 10, 2021
2 parents d31a0dc + 6d75906 commit 70deac1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions hack/install-buildx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env bash
set -eu -o pipefail
topdir="$(realpath $(dirname "$0")/..)"
cd "${topdir}"

VERSION="v0.5.1"
BINDIR="$(pwd)/bin"
DEST="${BINDIR}/buildx"
if [ -z "${BINDIR}" ] && [ -z "${PREFIX}" ]; then
PREFIX="$(realpath "$(dirname "$0")"/..)"
fi

: "${VERSION:=v0.5.1}"
: "${BINDIR:="${PREFIX}/bin"}"
: "${DEST:="${BINDIR}/buildx"}"

os=""
case "$(uname)" in
Expand Down

0 comments on commit 70deac1

Please sign in to comment.