From 2f5f2cffd853e523e64b5ed3adeef62a9c2079f5 Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Thu, 5 Mar 2020 21:27:48 +0100 Subject: [PATCH 1/2] Implement start.sh --- start.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) mode change 100644 => 100755 start.sh diff --git a/start.sh b/start.sh old mode 100644 new mode 100755 index e69de29..e088e61 --- a/start.sh +++ b/start.sh @@ -0,0 +1,12 @@ +#!/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 +else + python3 main.py "$@" +fi \ No newline at end of file From c5e3e8f3682a3f6ab5d1a23007f4ddbbf733c442 Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Thu, 5 Mar 2020 21:34:17 +0100 Subject: [PATCH 2/2] Rename sample module to hello world --- modules/helloworld/__init__.py | 5 +++++ modules/helloworld/helloWorld.py | 12 ++++++++++++ modules/sample/__init__.py | 5 ----- modules/sample/sampleModule.py | 12 ------------ start.sh | 1 + 5 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 modules/helloworld/__init__.py create mode 100644 modules/helloworld/helloWorld.py delete mode 100644 modules/sample/__init__.py delete mode 100644 modules/sample/sampleModule.py diff --git a/modules/helloworld/__init__.py b/modules/helloworld/__init__.py new file mode 100644 index 0000000..604b6e5 --- /dev/null +++ b/modules/helloworld/__init__.py @@ -0,0 +1,5 @@ +from .helloWorld import HelloWorld + + +def get_module(): + return HelloWorld() diff --git a/modules/helloworld/helloWorld.py b/modules/helloworld/helloWorld.py new file mode 100644 index 0000000..cda03ab --- /dev/null +++ b/modules/helloworld/helloWorld.py @@ -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.") diff --git a/modules/sample/__init__.py b/modules/sample/__init__.py deleted file mode 100644 index c1980aa..0000000 --- a/modules/sample/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -from .sampleModule import SampleModule - - -def get_module(): - return SampleModule() diff --git a/modules/sample/sampleModule.py b/modules/sample/sampleModule.py deleted file mode 100644 index 6a5b385..0000000 --- a/modules/sample/sampleModule.py +++ /dev/null @@ -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") diff --git a/start.sh b/start.sh index e088e61..71aa416 100755 --- a/start.sh +++ b/start.sh @@ -7,6 +7,7 @@ then 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 \ No newline at end of file