mirror of
https://github.com/Maks1mS/altlinux-autorepacked.git
synced 2025-01-12 15:31:03 +03:00
32 lines
767 B
Python
32 lines
767 B
Python
import subprocess
|
|
|
|
from autorepacked.base_provider import BaseProvider
|
|
|
|
|
|
class RustdeskProvider(BaseProvider):
|
|
_name = 'rustdesk'
|
|
_release_url = 'https://github.com/rustdesk/rustdesk/releases'
|
|
_release_file = '[0-9]/rustdesk-[0-9].[0-9].[0-9].deb'
|
|
|
|
def get_download_url(self):
|
|
url = subprocess.run(
|
|
args=[
|
|
'epm',
|
|
'--silent',
|
|
'tool',
|
|
'eget',
|
|
'--list',
|
|
'--latest',
|
|
'--get-real-url',
|
|
self._release_url,
|
|
self._release_file,
|
|
],
|
|
stdout=subprocess.PIPE
|
|
).stdout.decode('utf-8')
|
|
|
|
return url
|
|
|
|
|
|
def get_provider(config):
|
|
return RustdeskProvider(config)
|