You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
562 B
Python
26 lines
562 B
Python
2 years ago
|
import subprocess
|
||
|
|
||
|
|
||
|
class Flatpak:
|
||
|
|
||
|
@staticmethod
|
||
|
def install(self, packages: list):
|
||
|
subprocess.run(
|
||
|
['flatpak', 'install', '--user'] + packages,
|
||
|
check=True
|
||
|
)
|
||
|
|
||
|
@staticmethod
|
||
|
def remove(self, packages: list):
|
||
|
subprocess.run(
|
||
|
['flatpak', 'remove', '--user'] + packages,
|
||
|
check=True
|
||
|
)
|
||
|
|
||
|
@staticmethod
|
||
|
def add_repo(self, repo: str):
|
||
|
subprocess.run(
|
||
|
['flatpak', 'remote-add', '--user', '--if-not-exists', repo],
|
||
|
check=True
|
||
|
)
|