gen_learning_curve_table.sh 721 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. # $1 is issues/${foo}/res0.json
  3. # $2 is $bugIntroDir
  4. # $3 is the firefox repo dir
  5. bugs=$(jq -r '.issues | map(.key) | .[]' "$1" | tr -d '-')
  6. cd "$2"
  7. for bug in $bugs ; do
  8. #echo $bug
  9. if [ -f "$bug" ] ; then
  10. while read vcc ; do
  11. if [ -z "$vcc" ]; then
  12. echo "ERROR: empty introducer file: $bug"
  13. echo "(continuing best we can, but you need to fix a bug somewhere)"
  14. continue
  15. fi
  16. if [ -z "$(git -C "$3" log --since-as-filter=2012-04-09 -1 "$vcc")" ]; then
  17. continue
  18. fi
  19. contribto=$(grep -l $vcc *)
  20. echo "$vcc",$contribto | tr ' ' ,
  21. done < $bug
  22. fi
  23. done