Skip to content

Instantly share code, notes, and snippets.

@MilhouseVH
Created March 21, 2016 12:10
Show Gist options
  • Save MilhouseVH/2ca3459e29e6e9fa6033 to your computer and use it in GitHub Desktop.
Save MilhouseVH/2ca3459e29e6e9fa6033 to your computer and use it in GitHub Desktop.
#!/bin/bash
# just for testing
usleep()
{
sleep $(echo $1 | awk '{print $1 / 1000000}')
}
. ./functions
StartProgress percent "percent test ... " "/tmp/moo1" 104857600 \
"dd if=/dev/zero of=/tmp/moo1 conv=fsync bs=10 count=10485760 &>/dev/null; false" "Success" "Failure"
StartProgress spinner "spinner test " "sleep 2; false" ": Success" ": Failure"
StartProgress spinner "spinner test " "sleep 2; true" ": Success" ": Failure"
StartProgress countdown "countdown test in 5 seconds... " 5 "NOW"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment