From 557c45187612850e67b8c3241861f19670139ccc Mon Sep 17 00:00:00 2001 From: axk4545 Date: Thu, 20 Apr 2017 11:22:22 -0400 Subject: [PATCH] added check for sudo --- ci-build-mock.sh | 8 +++++++- ci-build.sh | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ci-build-mock.sh b/ci-build-mock.sh index e8bed38..a66f8cf 100644 --- a/ci-build-mock.sh +++ b/ci-build-mock.sh @@ -5,9 +5,15 @@ set -eu # TigerOS Build Script for running on the build box with Jenkins CI # # @author: Aidan Kahrs # # # -# Usage: sudo bash build.sh # +# Usage: sudo bash ci-build-mock.sh # # # ##################################################################### +# Check that the current user is root +if [ $EUID != 0 ] +then + echo "Please run this script as root (sudo $@$0)." + exit +fi wget -O tigeros.ks https://raw.githubusercontent.com/RITlug/TigerOS/master/tigeros.ks mock -r fedora-25-x86_64 --init mock -r fedora-25-x86_64 --copyin tigeros.ks ./tigeros.ks diff --git a/ci-build.sh b/ci-build.sh index 6265a00..e328cef 100644 --- a/ci-build.sh +++ b/ci-build.sh @@ -5,9 +5,15 @@ set -eu # TigerOS Build Script for running on the build box with Jenkins CI # # @author: Aidan Kahrs # # # -# Usage: sudo bash build.sh # +# Usage: sudo bash ci-build.sh # # # ##################################################################### +# Check that the current user is root +if [ $EUID != 0 ] +then + echo "Please run this script as root (sudo $@$0)." + exit +fi rm -rf tigeros.ks wget -O tigeros.ks https://raw.githubusercontent.com/RITlug/TigerOS/master/tigeros.ks livemedia-creator --ks tigeros.ks --no-virt --resultdir /var/lmc --project TigerOS-Live --make-iso --volid TigerOS --iso-only --iso-name TigerOS.iso --releasever 25 --title TigerOS-live --macboot