diff --git a/builder/build-iso.sh b/builder/build-iso.sh index 0c917d6..22aeb75 100755 --- a/builder/build-iso.sh +++ b/builder/build-iso.sh @@ -30,7 +30,7 @@ pacman --noconfirm -Sy archlinux-keyring # so this container can be months behind the mirror it installs from. A plain # -Sy install is then a partial upgrade — new packages linked against a glibc # the container doesn't have yet. -pacman --noconfirm -Syu archiso git sudo base-devel jq grub imagemagick neovim nodejs npm tree-sitter-cli +pacman --noconfirm -Syu archiso git sudo base-devel jq grub imagemagick neovim nodejs npm tree-sitter-cli go # Pre-import the omarchy signing key (so pacman trusts our [omarchy] repo # during the build without keyserver lookups). @@ -114,6 +114,20 @@ echo "$NODE_SHA /tmp/$NODE_FILENAME" | sha256sum -c - mkdir -p "$build_cache_dir/airootfs/opt/packages/" cp "/tmp/$NODE_FILENAME" "$build_cache_dir/airootfs/opt/packages/" +# Rime Ice and Wanxiang for offline China installs. +rime_dir="$build_cache_dir/airootfs/opt/packages/rime-ice" +mkdir -p "$rime_dir" +bundle_release_asset() { + local url digest + read -r url digest < <(curl -fsSL "https://api.github.com/repos/$1/releases/tags/$2" | + jq -r --arg name "$3" '.assets[] | select(.name == $name) | "\(.browser_download_url) \(.digest)"') || + { echo "ERROR: $3 is missing from the $1 $2 release" >&2; exit 1; } + curl -fsSL "$url" -o "$rime_dir/$3" + echo "${digest#sha256:} $rime_dir/$3" | sha256sum -c - +} +bundle_release_asset iDvel/rime-ice nightly full.zip +bundle_release_asset amzxyz/RIME-LMDG LTS wanxiang-lts-zh-hans.gram + # Packages installed into the live ISO environment itself (NOT the target system). # The selected omarchy-settings package is needed here so its post_install hook # drops Omarchy's plymouthd.conf into /etc/plymouth before mkarchiso builds the @@ -226,7 +240,8 @@ if [[ -n ${LOCAL_OMARCHY_BUILD:-} ]]; then grep -Fxv \ -e "$OMARCHY_RUNTIME_PACKAGE" \ -e "$OMARCHY_SETTINGS_PACKAGE" \ - -e "$OMARCHY_NVIM_PACKAGE" || true + -e "$OMARCHY_NVIM_PACKAGE" \ + -e rime-ice-installer || true ) fi @@ -263,7 +278,7 @@ mapfile -t required_package_files <<< "$resolved_package_files" # that the local build left exactly one file for each selected package name. if [[ -n ${LOCAL_OMARCHY_BUILD:-} ]]; then for local_package_name in \ - "$OMARCHY_RUNTIME_PACKAGE" "$OMARCHY_SETTINGS_PACKAGE" "$OMARCHY_NVIM_PACKAGE"; do + "$OMARCHY_RUNTIME_PACKAGE" "$OMARCHY_SETTINGS_PACKAGE" "$OMARCHY_NVIM_PACKAGE" rime-ice-installer; do local_package_file="" for candidate in "$offline_mirror_dir/$local_package_name-"*.pkg.tar.*; do [[ -f $candidate && $candidate != *.sig ]] || continue diff --git a/builder/build-omarchy-packages.sh b/builder/build-omarchy-packages.sh index 5f7173f..f81d8d5 100755 --- a/builder/build-omarchy-packages.sh +++ b/builder/build-omarchy-packages.sh @@ -40,6 +40,7 @@ packages=( "$OMARCHY_SETTINGS_PACKAGE" "$OMARCHY_RUNTIME_PACKAGE" "$OMARCHY_NVIM_PACKAGE" + rime-ice-installer ) # Local-source packages must replace every cached build of the same package,