buildscript: don't error out when running as root #299

Closed
jkimmel wants to merge 2 commits from jkimmel/firmware:dont-check-root into master
1 changed files with 6 additions and 2 deletions

View File

@ -381,8 +381,12 @@ buildall() {
}
if [ "$(/usr/bin/id -u)" -eq 0 ]; then
echo "don't run buildscript as root"
exit 1
TPUT=$(command -v tput || echo ":")
textWarn="$($TPUT bold setaf 1)" # bold + red
textReset="$($TPUT sgr0)" # be a good citizen
printf "${textWarn}WARNING: buildscript is running as root${textReset}\n"
printf "${textWarn}WARNING: build may fail at a later stage${textReset}\n"
fi
if [ "$1" != "selectbsp" -a "$1" != "selectvariant" ]; then