Add a subcommand for reinstalling packages from the stable repository

This commit is contained in:
David Heinemeier Hansson
2026-01-05 10:33:47 +01:00
parent ca40676657
commit df3b1cbb82

17
bin/omarchy-reinstall-pkgs Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
# Attempt to reinstall all default Omarchy packages and reset all the default configs.
set -e
echo "Reinstalling missing Omarchy packages from stable repository"
# Set the package repository to the stable mirrors
omarchy-refresh-pacman
# Downgrade any packages to the stable setup
sudo pacman -Suu
# Ensure all packages are installed
mapfile -t packages < <(grep -v '^#' "$OMARCHY_PATH/install/omarchy-base.packages" | grep -v '^$')
sudo pacman -Syu --noconfirm --needed "${packages[@]}"