From dbd281c310b5a688e764f1f997b54d35fdf03d19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 14 Nov 2025 13:34:37 +0100 Subject: [PATCH] prevent that lscpu|grep causes the script to fail --- bot/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/build.sh b/bot/build.sh index e33d0647..d414c5ac 100755 --- a/bot/build.sh +++ b/bot/build.sh @@ -176,7 +176,7 @@ lscpu > _bot_job${SLURM_JOB_ID}.lscpu cat /etc/os-release > _bot_job${SLURM_JOB_ID}.os # Also: fetch CPU flags into an array, so that we can implement a hard check against a reference -lscpu_flags_line=$(lscpu | grep "Flags:") +lscpu_flags_line=$(lscpu | grep "Flags:" || echo "") # strip leading "Flags:" and spaces, and put result in a bash array if [[ $lscpu_flags =~ Flags:\ (.*) ]]; then lscpu_flags=(${BASH_REMATCH[1]}); fi # for now, just print