The smoketest VMs start with -vga virtio, but Arch packages that display apart from qemu-base, so the base image build failed with "Virtio VGA not available". update.sh now installs qemu-hw-display-virtio-vga, and doctor and smoketest run check QEMU has the display before anything downloads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
43 lines
1.3 KiB
Bash
43 lines
1.3 KiB
Bash
#!/bin/bash
|
|
#
|
|
# Purpose : Keep coredesktop-dev current (run by CoreDesktop's `update`).
|
|
# Never asks anything.
|
|
|
|
set -e
|
|
|
|
SELF="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
COREDESKTOP="$HOME/.local/share/coredesktop"
|
|
|
|
source "$COREDESKTOP/utils.sh"
|
|
source "$SELF/lib/common.sh"
|
|
|
|
PACKAGES=(
|
|
shellcheck # make lint
|
|
bats # make test
|
|
tea # Gitea's CLI, for pull requests
|
|
qemu-base # the smoketest's virtual machines
|
|
qemu-hw-display-virtio-vga # the VM's -vga virtio (qemu-base leaves it out)
|
|
libisoburn # xorriso, for the smoketest VM's cloud-init disk
|
|
)
|
|
|
|
echo "Checking coredesktop-dev's packages..."
|
|
install_packages "${PACKAGES[@]}"
|
|
|
|
# A symlink, so each pull updates the command
|
|
mkdir -p "$HOME/.local/bin"
|
|
if [ "$(readlink "$HOME/.local/bin/coredesktop-dev")" != "$SELF/bin/coredesktop-dev" ]; then
|
|
ln -sfn "$SELF/bin/coredesktop-dev" "$HOME/.local/bin/coredesktop-dev"
|
|
echo "Linked ~/.local/bin/coredesktop-dev"
|
|
fi
|
|
|
|
# Refresh the working copy's pre-push hook, if it's ours and has changed
|
|
load_config
|
|
if [ -n "$WORKING_COPY" ] && is_coredesktop_clone "$WORKING_COPY"; then
|
|
source "$SELF/lib/hooks.sh"
|
|
hook="$(hook_path)"
|
|
if hook_is_ours "$hook" && ! cmp -s "$SELF/hooks/pre-push" "$hook"; then
|
|
install -m 755 "$SELF/hooks/pre-push" "$hook"
|
|
echo "Updated the pre-push hook in $WORKING_COPY"
|
|
fi
|
|
fi
|