From ec6487d2b1518c679e6c4a1fbf5ef567d9ec4e08 Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Sat, 13 Jul 2024 18:52:17 +0200 Subject: [PATCH] fix: style in build.sh --- build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 99f415b2..4e820b00 100755 --- a/build.sh +++ b/build.sh @@ -77,11 +77,10 @@ function generate_checksum() { function spinner() { local pid=$1 local delay=0.1 - local spinstr='|/-\' + local spinstr="|/-\\" tput civis # Hide the cursor printf "\r[%c] " " " - # shellcheck disable=SC2143 - while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do + while kill -0 $pid 2>/dev/null; do local temp=${spinstr#?} printf "\r [%c] " "$spinstr" local spinstr=$temp${spinstr%"$temp"}