2
0
mirror of https://github.com/deajan/osync synced 2024-11-03 15:40:14 +00:00

Fixed possible issue if global var toggle is used

This commit is contained in:
deajan 2016-11-20 22:18:36 +01:00
parent 4bae4fa917
commit 5ec5d01dca

View File

@ -528,30 +528,30 @@ function Spinner {
return 0
fi
case $toggle
case $_OFUNCTIONS_SPINNER_TOGGLE
in
1)
echo -n " \ "
echo -ne "\r"
toggle="2"
_OFUNCTIONS_SPINNER_TOGGLE=2
;;
2)
echo -n " | "
echo -ne "\r"
toggle="3"
_OFUNCTIONS_SPINNER_TOGGLE=3
;;
3)
echo -n " / "
echo -ne "\r"
toggle="4"
_OFUNCTIONS_SPINNER_TOGGLE=4
;;
*)
echo -n " - "
echo -ne "\r"
toggle="1"
_OFUNCTIONS_SPINNER_TOGGLE=1
;;
esac
}