Just always get the latest version of OpenHV

This commit is contained in:
DeathByDenim 2022-07-07 18:36:37 -04:00
parent 22b9bbf3c8
commit 2b5592c371
Signed by: DeathByDenim
GPG Key ID: 4A475283D925365B
1 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,10 @@ if [ -e /etc/systemd/system/openhv.service ]; then
systemctl stop openhv
fi
if [ -z ${openhv_version} ] || [ "${openhv_version}" = "latest" ]; then
openhv_version=$(git ls-remote --refs --sort="version:refname" --tags https://github.com/OpenHV/OpenHV | tail -n1 | cut -d'/' -f3)
fi
# Install OpenHV
mkdir -p /opt/openhv-${openhv_version}
curl --location "https://github.com/OpenHV/OpenHV/releases/download/${openhv_version}/OpenHV-${openhv_version}-x86_64.AppImage" > /opt/openhv-${openhv_version}/OpenHV-x86_64.AppImage