From 8724ef4c9e717f0ec15822c1263a77dca8a32972 Mon Sep 17 00:00:00 2001 From: Andrew Fresh Date: Thu, 21 Mar 2024 01:02:30 +0000 Subject: Clear spinner after each cycle Otherwise we can get left with a piece of the spinner if all firmware gets updates and don't print a "kept" value. While here, replace \010 with the ksh supported \b, as suggested by cheloha@ Noticed by deraadt@ --- usr.sbin/fw_update/fw_update.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.sbin/fw_update') diff --git a/usr.sbin/fw_update/fw_update.sh b/usr.sbin/fw_update/fw_update.sh index 4be63c8a351..912f86ad9b9 100644 --- a/usr.sbin/fw_update/fw_update.sh +++ b/usr.sbin/fw_update/fw_update.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: fw_update.sh,v 1.55 2023/11/15 02:07:43 afresh1 Exp $ +# $OpenBSD: fw_update.sh,v 1.56 2024/03/21 01:02:29 afresh1 Exp $ # # Copyright (c) 2021,2023 Andrew Hewus Fresh # @@ -100,9 +100,10 @@ spin() { { for p in '/' '-' '\\' '|' '/' '-' '\\' '|'; do - echo -n "$p"'\010' + echo -n "$p"'\b' sleep 0.125 done + echo -n " "'\b' }>/dev/tty } -- cgit v1.2.3