mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
* Add omarchy CLI * Remove outdated or internal * Add bash completions for command * Add omarchy command documentation * Add missing docs * Correct to what's now right * Fix tests --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
24 lines
800 B
Bash
Executable File
24 lines
800 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Overwrite the package configuration for /etc/pacman with the Omarchy default of using its dedicated mirrors and repositories, then update all packages.
|
|
# omarchy:requires-sudo=true
|
|
|
|
sudo cp -f /etc/pacman.conf /etc/pacman.conf.bak
|
|
sudo cp -f /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
|
|
|
|
channel="${1:-stable}"
|
|
|
|
if [[ $channel != "stable" && $channel != "rc" && $channel != "edge" ]]; then
|
|
echo "Error: Invalid channel '$channel'. Must be one of: stable, rc, edge"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Setting channel to $channel"
|
|
echo
|
|
|
|
sudo cp -f "$OMARCHY_PATH/default/pacman/pacman-$channel.conf" /etc/pacman.conf
|
|
sudo cp -f "$OMARCHY_PATH/default/pacman/mirrorlist-$channel" /etc/pacman.d/mirrorlist
|
|
|
|
# Reset all package DBs and then update
|
|
sudo pacman -Syyuu --noconfirm
|