diff --git a/bin/omarchy-upgrade-to-4 b/bin/omarchy-upgrade-to-4 index 9044db86..aa028c3a 100755 --- a/bin/omarchy-upgrade-to-4 +++ b/bin/omarchy-upgrade-to-4 @@ -1,15 +1,15 @@ #!/bin/bash # omarchy:summary=Upgrade a legacy Omarchy install to the package-backed Omarchy 4 layout. -# omarchy:args=[--yes] [--reboot] [--channel stable|rc|edge] [--user USER] -# omarchy:examples=omarchy upgrade to 4 +# omarchy:args=[--yes] [--reboot] [--dev] [--channel stable|rc|edge] [--user USER] +# omarchy:examples=omarchy upgrade to 4 | omarchy upgrade to 4 --dev # omarchy:requires-sudo=true set -euo pipefail usage() { cat <<'USAGE' -Usage: omarchy-upgrade-to-4 [--yes] [--reboot] [--channel stable|rc|edge] [--user USER] +Usage: omarchy-upgrade-to-4 [--yes] [--reboot] [--dev] [--channel stable|rc|edge] [--user USER] Upgrade any pre-4 Omarchy install to the package-backed Omarchy 4 layout. This script is intentionally self-contained so it can be shipped as a command @@ -18,6 +18,7 @@ in Omarchy 3.8.x or run directly with curl | bash on older systems. Options: -y, --yes Do not prompt before upgrading --reboot Reboot automatically after a successful upgrade + --dev Use stop-gap packages from the [omarchy-dev] repo --channel stable|rc|edge Override detected Omarchy package channel --user USER User account to refresh after package install -h, --help Show this help @@ -54,6 +55,7 @@ channel_override="${OMARCHY_UPGRADE_CHANNEL:-${OMARCHY_CHANNEL:-${OMARCHY_MIRROR target_user="${OMARCHY_INSTALL_USER:-}" yes=0 auto_reboot=0 +use_dev_packages=${OMARCHY_UPGRADE_DEV:-0} while (($#)); do case "$1" in @@ -65,6 +67,10 @@ while (($#)); do auto_reboot=1 shift ;; + --dev) + use_dev_packages=1 + shift + ;; --channel) channel_override="${2:-}" shift 2 @@ -83,6 +89,12 @@ while (($#)); do esac done +case "$use_dev_packages" in + 1|true|yes|on) use_dev_packages=1 ;; + 0|false|no|off|"") use_dev_packages=0 ;; + *) fail "Invalid OMARCHY_UPGRADE_DEV value '$use_dev_packages'. Use 1/0, true/false, or pass --dev." ;; +esac + if ! command -v pacman >/dev/null 2>&1; then fail "This upgrade is only supported on Arch/Omarchy systems with pacman." fi @@ -313,9 +325,12 @@ case "$channel" in esac if (( ! yes )); then + package_mode="production Omarchy packages" + (( use_dev_packages )) && package_mode="stop-gap packages from [omarchy-dev]" + cat < ttf-jetbrains-mono-nerd-basic.