#!/usr/bin/env bash

# omarchy:summary=Install Packer, the machine image builder
# omarchy:requires-sudo=true

# Based: Debian carries no packer, so it comes through asdf from the
# reviewed plugin bundle; a Mac takes it from HashiCorp's tap. The Packer
# editor extension comes with it.

set -eo pipefail

echo "Installing Packer..."
case $(omarchy-os) in
darwin)
  omarchy-pkg-add packer brew=hashicorp/tap/packer
  ;;
*)
  omarchy-pkg-add asdf
  omarchy-dev-env-tool packer
  ;;
esac

omarchy-code-extensions 4ops.packer
