From 28c078da4c3fc14ced0c2afcd72d26861a3620d2 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 28 Jun 2015 15:48:34 +0100 Subject: use this script as root only --- buildbot | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/buildbot b/buildbot index 626b4f0..c661b39 100755 --- a/buildbot +++ b/buildbot @@ -26,6 +26,15 @@ export local envkogaionoverlay="layman -f -a kogaion -o https://raw.github.com/R export local envkogaiondesktopoverlay="layman -f -a kogaion-desktop -o https://raw.github.com/Rogentos/kogaion-desktop/master/overlay.xml" +envcheckroot () { + if [[ "$(whoami)" != root ]] ; then + echo "" + echo "You're not root?...No cookies for you, go away !!!" + echo "" + exit 1 + fi +} + envkogaionsquashfsintegrity () { # our bare metal buildserver is x86_64 but we want to build 32bit packages as well # run this script with linux32 to fool it we run i686 and to build 32bit packages @@ -197,11 +206,13 @@ envkogaionprepare () { } main () { - envkogaionsquashfsintegrity - envkogaionprepare - envkogaionbuildsystem - envkogaionbuild - envkogaionchroot + if envcheckroot ; then + envkogaionsquashfsintegrity + envkogaionprepare + envkogaionbuildsystem + envkogaionbuild + envkogaionchroot + fi } main -- cgit v1.2.3