Skip to content

Commit 99670f7

Browse files
CopilotKSXGitHub
andcommitted
Extract hyperfine URL and archive name into local variables
Co-authored-by: KSXGitHub <11488886+KSXGitHub@users.noreply.github.com>
1 parent 253d9e3 commit 99670f7

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.devcontainer/post-create.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ npm install -g pnpm@7.33.7
1010

1111
echo "Installing hyperfine from GitHub release..." >&2
1212
HYPERFINE_VERSION="1.20.0"
13+
HYPERFINE_ARCHIVE="hyperfine-v${HYPERFINE_VERSION}-x86_64-unknown-linux-musl"
14+
HYPERFINE_URL="https://github.com/sharkdp/hyperfine/releases/download/v${HYPERFINE_VERSION}/${HYPERFINE_ARCHIVE}.tar.gz"
1315
mkdir -p "$HOME/.local/bin"
14-
curl -fsSL "https://github.com/sharkdp/hyperfine/releases/download/v${HYPERFINE_VERSION}/hyperfine-v${HYPERFINE_VERSION}-x86_64-unknown-linux-musl.tar.gz" \
15-
| tar -xz --strip-components=1 -C "$HOME/.local/bin" "hyperfine-v${HYPERFINE_VERSION}-x86_64-unknown-linux-musl/hyperfine"
16+
curl -fsSL "$HYPERFINE_URL" \
17+
| tar -xz --strip-components=1 -C "$HOME/.local/bin" "${HYPERFINE_ARCHIVE}/hyperfine"

0 commit comments

Comments
 (0)