Merge branch '12-basic-command-line-tools' into 'master'

Resolve "Install basic command-line tools"

Closes #12

See merge request icaotix/linux-tools!6
This commit is contained in:
Marcel Schwarz 2020-03-06 00:24:12 +00:00
commit 8bdef1d4e8
3 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,5 @@
from .module import CmdToolsModule
def get_module():
return CmdToolsModule()

View File

@ -0,0 +1,26 @@
import json
import subprocess
from AbstractModule import AbstractModule
class CmdToolsModule(AbstractModule):
def __init__(self):
super().__init__()
with open("modules/program-installer/programs.json") as config_file:
self.programs_json = json.load(config_file)
def run(self):
"""Install the most basic tools!"""
print("Try to install basic Command-line tools")
programs_list = " ".join(p for p in self.programs_json['basic-tools'])
subprocess.run("apt install" + programs_list, shell=True)
print("Script ran to completion.")
def hard_drive_tools(self):
"""Install tools to look up smart information from your hard-drives"""
programs_list = " ".join(p for p in self.programs_json['hard-drive'])
subprocess.run("apt install " + programs_list, shell=True)

View File

@ -0,0 +1,16 @@
{
"basic-tools": [
"bleachbit",
"nano",
"xrdp",
"htop",
"bash-completion",
"dialog",
"powertop",
"tree"
],
"hard-drive": [
"smartmontools",
"gsmartcontrol"
]
}