Merge branch '19-bash-prepare-script' into 'master'

Resolve "Bash script to prepare the system for the first use of the python based cli"

Closes #19

See merge request icaotix/linux-tools!14
This commit is contained in:
Marcel Schwarz 2020-03-05 20:41:01 +00:00
commit 4c81e9d66b
5 changed files with 30 additions and 17 deletions

View File

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

View File

@ -0,0 +1,12 @@
from AbstractModule import AbstractModule
class HelloWorld(AbstractModule):
"""docstring for SampleModule."""
def __init__(self):
super(HelloWorld, self).__init__()
def run(self):
print("This shows that your installation is working correctly.")
print("You can now start using the tool.")

View File

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

View File

@ -1,12 +0,0 @@
from AbstractModule import AbstractModule
class SampleModule(AbstractModule):
"""docstring for SampleModule."""
def __init__(self):
super(SampleModule, self).__init__()
def run(self):
print("Command 1")
print("Command 2")

13
start.sh Normal file → Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
if [ "$1" == "prepare" ]
then
echo "Preparing your system for the first run"
apt update -y && apt upgrade -y
apt install python3.7 python3-pip -y
pip3 install setuptools wheel regex
pip3 install -r requirements.txt
python3 main.py helloworld run
else
python3 main.py "$@"
fi