From 5dcb6b771106df130b4884867dc28bd685b64e40 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Wed, 20 Mar 2024 17:50:51 +0000 Subject: chore: T671: remove unused scripts and references to them --- tools/get_latest_iso.py | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100755 tools/get_latest_iso.py (limited to 'tools/get_latest_iso.py') diff --git a/tools/get_latest_iso.py b/tools/get_latest_iso.py deleted file mode 100755 index 4a2ea9a8..00000000 --- a/tools/get_latest_iso.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python3 - -import os -import sys -from lxml import html -from urllib.parse import unquote -import requests - -BASE_URL = 'https://downloads.vyos.io/' -PAGE_URL = BASE_URL+'?dir=rolling/current/amd64' - - -def download(): - page = requests.get(PAGE_URL) - tree = html.fromstring(page.content) - path = '//*[@id="directory-listing"]/li/a[1]/@href' - isos = [x for x in tree.xpath(path) if os.path.splitext(x)[1] == '.iso'] - latest_iso_url = os.path.join(BASE_URL, isos[-1]) - filename = unquote(os.path.basename(latest_iso_url)) - print(filename) - if os.path.exists(filename): - print("{} already exists".format(filename)) - sys.exit(0) - r = requests.get(latest_iso_url) - with open(filename, 'wb') as fd: - for chunk in r.iter_content(chunk_size=128): - fd.write(chunk) - - -if __name__ == '__main__': - download() -- cgit v1.2.3