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.

45 lines
1.0KB

  1. #!/bin/sh
  2. set -e
  3. if test "bisect" = "`basename $0`" ; then
  4. echo WARNING, trying to execute tools/bisect directly this cannot work as
  5. echo the script itself would not be available in older checkouts
  6. echo please use tools/ffbisect
  7. git show master:tools/bisect > tools/ffbisect
  8. chmod u+x tools/ffbisect
  9. exit 1
  10. fi
  11. if ! git show master:tools/bisect | diff - tools/ffbisect > /dev/null ; then
  12. echo updating tools/ffbisect script to HEAD.
  13. git show master:tools/bisect > tools/ffbisect
  14. chmod u+x tools/ffbisect
  15. tools/ffbisect $*
  16. exit 0
  17. fi
  18. case "$1" in
  19. need)
  20. case $2 in
  21. ffmpeg|ffplay|ffprobe|ffserver)
  22. echo $2.c >> tools/bisect.need
  23. ;;
  24. esac
  25. ;;
  26. start|reset)
  27. echo . > tools/bisect.need
  28. git bisect $*
  29. ;;
  30. skip)
  31. git bisect $*
  32. ;;
  33. good|bad)
  34. git bisect $*
  35. until ls `cat tools/bisect.need` > /dev/null 2> /dev/null; do
  36. git bisect skip || break
  37. done
  38. ;;
  39. esac