From 704850f3327617ef7792b19c5d64f23178a3e1c3 Mon Sep 17 00:00:00 2001 From: solomoncyj Date: Sun, 24 Apr 2022 09:04:12 +0800 Subject: [PATCH] Update archtitus.sh --- archtitus.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/archtitus.sh b/archtitus.sh index 269e550..f436af9 100755 --- a/archtitus.sh +++ b/archtitus.sh @@ -3,7 +3,10 @@ # # @file ArchTitus # @brief Entrance script that launches children scripts for each phase of installation. - +if [ "$EUID" -ne 0 ] + then echo "Please run as root" + exit +fi # Find the name of the folder the scripts are in set -a SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" @@ -11,10 +14,7 @@ SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd CONFIGS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"/configs set +a # @testing if script was run as root for full os run -if [ "$EUID" -ne 0 ] - then echo "Please run as root" - exit -fi + echo -ne " ------------------------------------------------------------------------- █████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗