Add spinner function for bash script.