Check if lnxtools.sh is run as root
Update requirements.txt Update wording
This commit is contained in:
parent
ecc63013c1
commit
b09431877e
@ -1,5 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/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 )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
cd "$DIR" || exit
|
cd "$DIR" || exit
|
||||||
FILE=./your_system_information.txt
|
FILE=./your_system_information.txt
|
||||||
@ -8,7 +13,6 @@ if [ ! -f "$FILE" ]; then
|
|||||||
echo "Preparing your system for the first run"
|
echo "Preparing your system for the first run"
|
||||||
apt-get update -y && apt-get upgrade -y
|
apt-get update -y && apt-get upgrade -y
|
||||||
apt-get install curl screenfetch python3.7 python3-pip -y
|
apt-get install curl screenfetch python3.7 python3-pip -y
|
||||||
pip3 install setuptools wheel regex
|
|
||||||
pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
python3 main.py helloworld
|
python3 main.py helloworld
|
||||||
else
|
else
|
||||||
|
@ -5,9 +5,10 @@ from print_helpers import print_gr
|
|||||||
|
|
||||||
|
|
||||||
def helloworld():
|
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)
|
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")
|
output = subprocess.check_output("cat /etc/*-release", shell=True).decode("UTF-8")
|
||||||
with open("your_system_information.txt", "w") as file:
|
with open("your_system_information.txt", "w") as file:
|
||||||
file.write(output)
|
file.write(output)
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
from print_helpers import print_gr
|
||||||
|
|
||||||
|
|
||||||
def basic_tools():
|
def basic_tools():
|
||||||
"""Install the most 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",
|
"apt update && apt-get install -y bleachbit nano htop bash-completion dialog powertop tree wget vim git",
|
||||||
shell=True
|
shell=True
|
||||||
)
|
)
|
||||||
print("Script ran to completion.")
|
print_gr("Module basictools has successfully finished!")
|
||||||
|
|
||||||
|
|
||||||
def hard_drive_tools():
|
def hard_drive_tools():
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
fire==0.3.1
|
fire==0.3.1
|
||||||
PyInquirer==1.0.3
|
PyInquirer==1.0.3
|
||||||
|
regex==2020.7.14
|
||||||
|
wheel==0.34.2
|
||||||
|
setuptools==49.2.0
|
||||||
|
Loading…
Reference in New Issue
Block a user