This PR contains the following updates:
| Package | Update | Change |
|---|---|---|
| [asdf-vm/asdf](https://redirect.github.com/asdf-vm/asdf) | patch |
`v0.16.6` -> `v0.16.7` |
---
### Release Notes
<details>
<summary>asdf-vm/asdf (asdf-vm/asdf)</summary>
###
[`v0.16.7`](https://redirect.github.com/asdf-vm/asdf/releases/tag/v0.16.7)
[Compare
Source](https://redirect.github.com/asdf-vm/asdf/compare/v0.16.6...v0.16.7)
##### Bug Fixes
- remove comment from first line zsh completion output
([#​2035](https://redirect.github.com/asdf-vm/asdf/issues/2035))
([#​2037](https://redirect.github.com/asdf-vm/asdf/issues/2037))
([74d7b17](74d7b17a1c))
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/kellervater/homeracker).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMzguMCIsInVwZGF0ZWRJblZlciI6IjM5LjIzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiLCJ1cGdyYWRlOnBhdGNoIl19-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
57 lines
1.6 KiB
Bash
Executable File
57 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
# renovate: datasource=github-releases depName=asdf-vm/asdf versioning=semver
|
|
ASDF_VERSION=v0.16.7
|
|
|
|
add_line_to_file_if_not_exists() {
|
|
local file="$1"
|
|
local line="$2"
|
|
|
|
if ! grep -Fxq "$line" "$file"; then
|
|
echo "Adding line to $file..."
|
|
echo "$line" >> "$file"
|
|
fi
|
|
}
|
|
|
|
# Download and extract the archive
|
|
OS=$(uname | tr '[:upper:]' '[:lower:]')
|
|
ARCH=$(uname -m)
|
|
case "$ARCH" in
|
|
x86_64) ARCH="amd64" ;;
|
|
aarch64) ARCH="arm64" ;;
|
|
*) echo "❌ Unsupported architecture: $ARCH"; exit 1 ;;
|
|
esac
|
|
ARCHIVE_URL="https://github.com/asdf-vm/asdf/releases/download/${ASDF_VERSION}/asdf-${ASDF_VERSION}-${OS}-${ARCH}.tar.gz"
|
|
INSTALL_DIR="$HOME/.asdf"
|
|
|
|
echo "🗑️ Removing existing asdf installation..."
|
|
if [ -d "$INSTALL_DIR" ]; then
|
|
rm -rf "$INSTALL_DIR"
|
|
fi
|
|
|
|
echo "⬇️ Downloading asdf version ${ASDF_VERSION}..."
|
|
curl -sSL "$ARCHIVE_URL" -o /tmp/asdf.tar.gz
|
|
|
|
echo "📦 Extracting asdf..."
|
|
mkdir -p "$INSTALL_DIR"
|
|
tar -xzf /tmp/asdf.tar.gz -C "$INSTALL_DIR"
|
|
|
|
# Clean up
|
|
echo "🧹 Cleaning up..."
|
|
rm /tmp/asdf.tar.gz
|
|
|
|
# shellcheck disable=SC2016
|
|
add_line_to_file_if_not_exists "$HOME/.bashrc" 'export PATH="$HOME/.asdf:$PATH"'
|
|
# shellcheck disable=SC2016
|
|
add_line_to_file_if_not_exists "$HOME/.bash_profile" 'export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"'
|
|
# shellcheck disable=SC2016
|
|
add_line_to_file_if_not_exists "$HOME/.bashrc" '. <(asdf completion bash)'
|
|
|
|
|
|
export PATH="$HOME/.asdf:$PATH"
|
|
asdf -v
|
|
|
|
echo "✅ asdf version ${ASDF_VERSION} installed successfully. To enable code completion, please restart your terminal or run 'source ~/.bashrc'."
|