Upgrade the system before installing Rime when switching to China
This commit is contained in:
1 parent
77c8e3f413
commit
dae9edef4c
3 files changed
+5
-4
No files matched your search
@@ -14,7 +14,7 @@ rewrite() { sed -e "s|/etc/|$root/etc/|g" -e "s| /\\.cargo/| $root/.cargo/|g" "$
|
||||
rewrite "$ROOT/install/config/region.sh" "$sandbox/install/config/region.sh"
|
||||
rewrite "$ROOT/bin/omarchy-region" "$sandbox/bin/omarchy-region"
|
||||
|
||||
for command in pacman omarchy-pkg-add locale-gen rime-ice-installer omarchy-setup-claude-api; do
|
||||
for command in omarchy-update-pacman omarchy-pkg-add locale-gen rime-ice-installer omarchy-setup-claude-api; do
|
||||
printf '#!/bin/bash\necho "%s $*" >>"%s"\n' "$command" "$calls" >"$test_tmp/bin/$command"
|
||||
done
|
||||
printf '#!/bin/bash\n[[ $1 == env ]] && shift\nexec env "$@"\n' >"$test_tmp/bin/sudo"
|
||||
@@ -33,8 +33,8 @@ omarchy-region china >/dev/null
|
||||
[[ $(<"$root/etc/pacman.conf") == "$china_conf" && $(<"$root/etc/pacman.d/mirrorlist") == "$china_mirrors" ]] ||
|
||||
fail "switching to China lists the .cn mirrors first"
|
||||
[[ $(omarchy-region) == "China" && $(<"$root/etc/locale.conf") == "LANG=zh_CN.UTF-8" ]] || fail "switching to China records it and sets the language"
|
||||
[[ $(<"$calls") == $'omarchy-pkg-add fcitx5-configtool fcitx5-rime librime opencc rime-ice-installer\nlocale-gen \nrime-ice-installer --yes' ]] ||
|
||||
fail "China installs Rime without a partial database sync, then sets Rime Ice up" "$(<"$calls")"
|
||||
[[ $(<"$calls") == $'omarchy-update-pacman -Syu --noconfirm\nomarchy-pkg-add fcitx5-configtool fcitx5-rime librime opencc rime-ice-installer\nlocale-gen \nrime-ice-installer --yes' ]] ||
|
||||
fail "China upgrades in full before installing Rime, then sets Rime Ice up" "$(<"$calls")"
|
||||
pass "switching to China sets mirrors, language and Rime Ice"
|
||||
|
||||
: >"$calls"
|
||||
|
||||
Reference in new issue
Block a user