From 41293bf9f014675ca8639468d19993e71e43745a Mon Sep 17 00:00:00 2001 From: Paul Whalen Date: May 04 2017 18:58:48 +0000 Subject: Removed uneeded sudo from update uboot. --- diff --git a/update-uboot b/update-uboot index 86364c5..3962a40 100755 --- a/update-uboot +++ b/update-uboot @@ -68,6 +68,11 @@ else DIR=$(dirname $0) BOARDDIR="${DIR}/boards.d" fi +# ensure sudo user +if [ "$(whoami)" != "root" ] ; then + echo "Error: This script requires 'sudo' privileges in order to write to disk & mount media." + exit 1 +fi # check if media exists if [[ ! -e $MEDIA ]] ; then @@ -87,7 +92,7 @@ if [[ $KOJI_TAG != '' ]] ; then exit 1 else PREFIX='/tmp/root/' - sudo rm -rf /tmp/root &> /dev/null + rm -rf /tmp/root &> /dev/null mkdir $PREFIX #get the latest uboot