From c57f6bd2d84fda25d6f407fb9e2d01d74527a7bb Mon Sep 17 00:00:00 2001 From: Shiloh Fen Date: Sun, 10 Aug 2025 19:08:50 -0500 Subject: [PATCH] seperate checks for openxr-libs and openvr-api --- src/atomic-xr/envision.nu | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/atomic-xr/envision.nu b/src/atomic-xr/envision.nu index 4147906..2ea395f 100644 --- a/src/atomic-xr/envision.nu +++ b/src/atomic-xr/envision.nu @@ -19,6 +19,19 @@ export def uninstall [] { log info "Successfully uninstalled Envision" } +def ensure-host-packages [ + ...packages: string +] { + $packages + | each {|package| + if (rpm -q $package | complete | get exit_code) != 0 { + rpm-ostree install $package + # TODO: Notification actions + notify-send -u critical $"`($package)` installed" "Please reboot or use `rpm-ostree ex apply-live` before attempting to launch Envision." + } + } +} + export def upgrade [] { distrobox upgrade envision @@ -34,11 +47,7 @@ export def upgrade [] { } git switch --detach (git tag -l --sort=v:refname | lines | last) - if (rpm -q openxr-libs openvr-api | complete | get exit_code) != 0 { - rpm-ostree install openxr-libs openvr-api - # TODO: Notification actions - notify-send -u critical "Package(s) Installed" "Please reboot or use `rpm-ostree ex apply-live` before attempting to launch Envision." - } + ensure-host-packages openxr-libs openvr-api [ "Actions=BuildMode;" -- 2.51.2