This commit is contained in:
iceBear67
2026-06-05 16:42:56 +08:00
commit 87e76877ca
23 changed files with 662 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
#!/bin/sh
set -u
echo "fetching latest version of cloud-hypervisor"
DOWNLOAD_URL=$(curl https://api.github.com/repos/cloud-hypervisor/cloud-hypervisor/releases | jq -r '.[0].assets.[] | select( .name == "cloud-hypervisor-static") | .browser_download_url')
if [ $? -ne 0 ]; then
echo "FAILED TO FETCH DOWNLOAD LINK OF CLOUD-HYPERVISOR-STATIC"
exit -1
fi
curl -sLo /usr/bin/cloud-hypervisor $DOWNLOAD_URL && chmod +x /usr/bin/cloud-hypervisor && cloud-hypervisor --help
if [ $? -ne 0 ]; then
echo "FAILED TO DOWNLOAD CLOUD-HYPERVISOR or CLOUD-HYPERVISOR IS NOT EXECUTABLE. (wrong arch?)"
exit -1
fi