aboutsummaryrefslogtreecommitdiffstats
path: root/spinner.sh
diff options
context:
space:
mode:
Diffstat (limited to 'spinner.sh')
-rw-r--r--spinner.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/spinner.sh b/spinner.sh
index 4965d8f..7a2c874 100644
--- a/spinner.sh
+++ b/spinner.sh
@@ -15,11 +15,11 @@ spinner() {
printf '\033[s\033[u[ \ ] %s\033[u' "$str"; sleep "$delay"
printf '\033[s\033[u[ | ] %s\033[u' "$str"; sleep "$delay"
done
- wait $PROC
+ wait ${PROC}
retval=$?
printf '\033[s\033[u%*s\033[u\033[0m' $((${#str}+6)) " " # return to normal
tput cnorm # restore cursor
- return 0
+ return $retval
}
export -f spinner \ No newline at end of file