#!/bin/bash set -euo pipefail source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh" test_dir=$(mktemp -d) trap 'rm -rf "$test_dir"' EXIT mkdir -p "$test_dir/bin" export PACMAN_CONFIG="$test_dir/pacman.conf" CALL_LOG="$test_dir/calls" sed "s|/etc/pacman.conf|$PACMAN_CONFIG|g" "$ROOT/migrations/1791403252.sh" >"$test_dir/migration.sh" cat >"$test_dir/bin/sudo" <<'SH' #!/bin/bash [[ ${CONFIG_STATUS:-0} == 0 ]] || exit "$CONFIG_STATUS" if [[ $1 == "install" ]]; then install -m 644 "${@: -2}" else "$@" fi SH cat >"$test_dir/bin/omarchy-update-system-pkgs" <<'SH' #!/bin/bash # Snapshot exactly the configuration visible to the package updater. cat "$PACMAN_CONFIG" >"$CALL_LOG" exit "${UPDATE_STATUS:-0}" SH chmod +x "$test_dir/bin/"* run() { rm -f "$CALL_LOG" env PATH="$test_dir/bin:$PATH" "$@" bash -euo pipefail "$test_dir/migration.sh" >"$test_dir/output" 2>&1 } for channel in stable rc edge; do cat >"$PACMAN_CONFIG" <