The little things give you away... A collection of various small helper stuff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

21 lines
297 B

  1. #!/bin/bash
  2. # Wait until an item has no outstanding tasks
  3. # Usage: ia-wait-item-tasks IDENTIFIER
  4. if [[ $# -ne 1 ]]
  5. then
  6. echo 'Usage: ia-wait-item-tasks IDENTIFIER'
  7. exit 1
  8. fi
  9. set -e
  10. while :
  11. do
  12. out="$(ia tasks "$1")"
  13. if ! grep -Fvq ' "finished": ' <<<"${out}"
  14. then
  15. break
  16. fi
  17. sleep 60
  18. done