diff options
author | Andrew Fresh <afresh1@cvs.openbsd.org> | 2024-03-21 01:02:30 +0000 |
---|---|---|
committer | Andrew Fresh <afresh1@cvs.openbsd.org> | 2024-03-21 01:02:30 +0000 |
commit | 8724ef4c9e717f0ec15822c1263a77dca8a32972 (patch) | |
tree | c980ae54161dedb787429502d3f32068607ccd22 /usr.sbin | |
parent | 90ad20ebb48647911fe8cd25dfe965eb9f04f0b1 (diff) |
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@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/fw_update/fw_update.sh | 5 |
1 files changed, 3 insertions, 2 deletions
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 <afresh1@openbsd.org> # @@ -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 } |