pull_and_push_fuzz_corpus.sh 459 B

1234567891011121314151617
  1. #!/bin/bash
  2. # A simple script to synchronise a fuzz test corpus
  3. # with an external git repository.
  4. # Usage:
  5. # pull_and_push_fuzz_corpus.sh DIR
  6. # It assumes that DIR is inside a git repo and push
  7. # can be done w/o typing a password.
  8. cd $1
  9. git add *
  10. git commit -m "fuzz test corpus"
  11. git pull --rebase --no-edit
  12. for((attempt=0; attempt<5; attempt++)); do
  13. echo GIT PUSH $1 ATTEMPT $attempt
  14. if $(git push); then break; fi
  15. git pull --rebase --no-edit
  16. done