2019-12-30 01:00:47 +01:00
|
|
|
import json
|
|
|
|
import subprocess
|
|
|
|
|
2019-12-30 00:33:25 +01:00
|
|
|
from AbstractModule import AbstractModule
|
|
|
|
|
|
|
|
|
|
|
|
class CmdToolsModule(AbstractModule):
|
|
|
|
def run(self):
|
2019-12-30 01:00:47 +01:00
|
|
|
print("Try to install basic Command-line tools")
|
|
|
|
|
|
|
|
with open("modules/command-line tools/programs.json") as config_file:
|
|
|
|
programms_list = json.load(config_file)
|
|
|
|
|
|
|
|
out = subprocess.run(["apt", "install"] + programms_list, shell=True, capture_output=True)
|
|
|
|
if len(out.stderr) > 0:
|
|
|
|
print(out.stderr.decode())
|
|
|
|
print("Install might be not complete, please check output above.")
|
|
|
|
else:
|
|
|
|
print("Installed successful.")
|