buildscript: don't error out when running as root #299
|
@ -381,8 +381,12 @@ buildall() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$(/usr/bin/id -u)" -eq 0 ]; then
|
if [ "$(/usr/bin/id -u)" -eq 0 ]; then
|
||||||
echo "don't run buildscript as root"
|
TPUT=$(command -v tput || echo ":")
|
||||||
exit 1
|
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
|
fi
|
||||||
|
|
||||||
if [ "$1" != "selectbsp" -a "$1" != "selectvariant" ]; then
|
if [ "$1" != "selectbsp" -a "$1" != "selectvariant" ]; then
|
||||||
|
|
Loading…
Reference in New Issue