Set up China before moving the mirrors so a failed switch leaves the machine Global

This commit is contained in:
ZacharyZhang-NY committed 2026-10-06 21:13:37 -04:00
1 parent 09da70c303
commit a3e40cb8b0
4 files changed
+28 -6

No files matched your search

+3 -2
View File
@@ -30,10 +30,11 @@ pacman_files=(/etc/pacman.conf /etc/pacman.d/mirrorlist)
drop_cn_servers='/^Server = https:\/\/[a-z-]*\.omarchy\.cn\//d'
if [[ $1 == "china" ]]; then
sudo sed -i -e "$drop_cn_servers" -f "$OMARCHY_PATH/default/region/china/pacman.sed" "${pacman_files[@]}"
echo "Package mirrors -> .cn first, .org after"
# Mirrors move last, so a failed setup leaves the machine wholly Global.
omarchy-update-pacman -Syu --noconfirm
sudo env OMARCHY_REGION=china OMARCHY_PATH="$OMARCHY_PATH" bash -e "$OMARCHY_PATH/install/config/region.sh"
sudo sed -i -e "$drop_cn_servers" -f "$OMARCHY_PATH/default/region/china/pacman.sed" "${pacman_files[@]}"
echo "Package mirrors -> .cn first, .org after"
if [[ ! -f $HOME/.local/share/fcitx5/rime/rime_ice.schema.yaml ]]; then
# A running fcitx5 only sees the new Rime addon after a restart.
systemctl --user try-restart omarchy-fcitx5.service