From 9dedd287dbdd7288f1b36e52b655f4f3ce030c4b Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sat, 6 Nov 2021 11:52:28 -0400 Subject: Added requirement to run script as root --- build.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index c51e97e..741349e 100755 --- a/build.sh +++ b/build.sh @@ -1,9 +1,17 @@ #!/bin/bash +if [ "$EUID" -ne 0 ] + then echo "Run this script as root to continue" + exit +fi echo "Building Alee Boot Utility" if [ -f "/usr/bin/mkarchiso" ]; then - if [ -d "log" ]; then + if [ ! -d "log" ]; then mkdir log fi + if [ -d "work" ]; then + echo "Removing the work directory" + rm -rf work + fi mkarchiso -v . | tee log/aleebootutility-$(date +%Y.%m.%d-%H.%M.%S).log else echo "You must install the archiso package beforing continuing this process..." -- cgit v1.2.3