Files
omarchy/migrations/1791387144.sh
T

13 lines
493 B
Bash

echo "Rename the China region to cn and follow its moved profile"
[[ $(cat /etc/omarchy/region 2>/dev/null) == "china" ]] || exit 0
# Links first, so a failure leaves china for the retry.
for link in /etc/environment.d/90-omarchy-china.conf /.cargo/config.toml /etc/gemrc; do
old=$(readlink "$link" || true)
if [[ $old == */default/region/china/* ]]; then
sudo ln -sfn "$OMARCHY_PATH/default/regions/cn/${old##*/}" "$link"
fi
done
echo cn | sudo tee /etc/omarchy/region >/dev/null