mirror of
https://github.com/placeholder-soft/asdf-foundry-zksync.git
synced 2026-01-12 07:04:07 +08:00
23 lines
659 B
Bash
Executable File
23 lines
659 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
current_script_path=${BASH_SOURCE[0]}
|
|
plugin_dir=$(dirname "$(dirname "$current_script_path")")
|
|
|
|
# shellcheck source=./lib/utils.bash
|
|
source "${plugin_dir}/lib/utils.bash"
|
|
|
|
mkdir -p "$ASDF_DOWNLOAD_PATH"
|
|
|
|
release_file="$ASDF_DOWNLOAD_PATH/$TOOL_NAME-$ASDF_INSTALL_VERSION.tar.gz"
|
|
|
|
# Download tar.gz file to the download directory
|
|
download_release "$ASDF_INSTALL_VERSION" "$release_file"
|
|
|
|
# Extract contents of tar.gz file into the download directory
|
|
tar -xzf "$release_file" -C "$ASDF_DOWNLOAD_PATH" || fail "Could not extract $release_file"
|
|
|
|
# Remove the tar.gz file since we don't need to keep it
|
|
rm "$release_file"
|