Update haos-vm.sh
This commit is contained in:
parent
154364de86
commit
330d42aee8
1 changed files with 10 additions and 7 deletions
|
@ -122,13 +122,16 @@ r = requests.get(url).json()
|
||||||
if "message" in r:
|
if "message" in r:
|
||||||
exit()
|
exit()
|
||||||
for release in r:
|
for release in r:
|
||||||
if release["prerelease"]:
|
if not release['prerelease']:
|
||||||
continue
|
continue
|
||||||
if asset in release["assets"]:
|
for asset in release['assets']:
|
||||||
if asset["name"].find("$RELEASE_TYPE") != -1:
|
if asset['name'].endswith('$RELEASE_EXT'):
|
||||||
image_url = asset["browser_download_url"]
|
global image_url
|
||||||
print(image_url)
|
image_url = asset['browser_download_url']
|
||||||
exit()
|
break
|
||||||
|
if 'image_url' in globals():
|
||||||
|
print(image_url)
|
||||||
|
break
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
if [ -z "$URL" ]; then
|
if [ -z "$URL" ]; then
|
||||||
|
|
Loading…
Reference in a new issue