Check if lnxtools.sh is run as root

Update requirements.txt
Update wording
This commit is contained in:
Lucas Noki 2020-08-02 04:16:30 +02:00
parent ecc63013c1
commit b09431877e
4 changed files with 14 additions and 4 deletions

View File

@ -1,5 +1,10 @@
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$DIR" || exit
FILE=./your_system_information.txt
@ -8,7 +13,6 @@ if [ ! -f "$FILE" ]; then
echo "Preparing your system for the first run"
apt-get update -y && apt-get upgrade -y
apt-get install curl screenfetch python3.7 python3-pip -y
pip3 install setuptools wheel regex
pip3 install -r requirements.txt
python3 main.py helloworld
else

View File

@ -5,9 +5,10 @@ from print_helpers import print_gr
def helloworld():
print_gr("This shows that your installation is working correctly.")
print_gr("This shows that your installation is working correctly")
subprocess.call("screenfetch", shell=True)
print_gr("You can now start using the tool.")
print_gr("You can now proceed with setting up individual modules")
print_gr("Run ./lnxtools.sh to see all available commands")
output = subprocess.check_output("cat /etc/*-release", shell=True).decode("UTF-8")
with open("your_system_information.txt", "w") as file:
file.write(output)

View File

@ -1,5 +1,7 @@
import subprocess
from print_helpers import print_gr
def basic_tools():
"""Install the most basic tools!"""
@ -8,7 +10,7 @@ def basic_tools():
"apt update && apt-get install -y bleachbit nano htop bash-completion dialog powertop tree wget vim git",
shell=True
)
print("Script ran to completion.")
print_gr("Module basictools has successfully finished!")
def hard_drive_tools():

View File

@ -1,2 +1,5 @@
fire==0.3.1
PyInquirer==1.0.3
regex==2020.7.14
wheel==0.34.2
setuptools==49.2.0