diff --git a/lnxtools.sh b/lnxtools.sh index 3dc3971..e4ee61b 100755 --- a/lnxtools.sh +++ b/lnxtools.sh @@ -1,17 +1,16 @@ #!/bin/bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$DIR" || exit +FILE=./your_system_information.txt -if [ "$1" == "prepare" ] -then +if [ ! -f "$FILE" ]; then echo "Preparing your system for the first run" apt-get update -y && apt-get upgrade -y - apt-get install python3.7 python3-pip -y + apt-get install curl screenfetch python3.7 python3-pip -y pip3 install setuptools wheel regex - cd "$DIR" || exit pip3 install -r requirements.txt python3 main.py helloworld else - cd "$DIR" || exit python3 main.py "$@" fi diff --git a/modules/helloworld/HelloWorld.py b/modules/helloworld/HelloWorld.py index da7e0c2..50975bb 100644 --- a/modules/helloworld/HelloWorld.py +++ b/modules/helloworld/HelloWorld.py @@ -6,8 +6,8 @@ class HelloWorld: def run(self): print("This shows that your installation is working correctly.") + subprocess.call("screenfetch", shell=True) print("You can now start using the tool.") output = subprocess.check_output("cat /etc/*-release", shell=True).decode("UTF-8") - print("Your system information \n" + output) with open("your_system_information.txt", "w") as file: file.write(output)