Compare commits

...

2 Commits

Author SHA1 Message Date
Johannes Kimmel 2cbe37a14b buildscript: add color to the root warning
Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
2024-01-19 23:05:19 +01:00
Johannes Kimmel 651e1ceb7c buildscript: print warning instead of failing build
Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
2024-01-19 23:05:19 +01:00
1 changed files with 4 additions and 2 deletions

View File

@ -382,8 +382,10 @@ buildall() {
}
if [ "$(/usr/bin/id -u)" -eq 0 ]; then
echo "don't run buildscript as root"
exit 1
textWarn='\033[1;31m' # bold + red
textReset='\033[0m' # be a good citizen
echo -e "${textWarn}WARNING: buildscript is running as root${textReset}"
echo -e "${textWarn}WARNING: build may fail at a later stage${textReset}"
fi
if [ "$1" != "selectbsp" -a "$1" != "selectvariant" ]; then