#!/usr/bin/env bash

# omarchy:summary=Install asdf, the version manager the development rows build on
# omarchy:requires-sudo=true
# omarchy:hidden=true

# Based: the asdf package carries the reviewed plugin bundle. ~/.asdfrc reads
# legacy version files (.nvmrc, .ruby-version) and keeps no downloads.

set -eo pipefail

echo "Installing asdf..."
omarchy-pkg-add asdf

if [[ ! -f ~/.asdfrc ]]; then
  printf 'legacy_version_file=yes\nalways_keep_download=no\n' >~/.asdfrc
fi
