applypatchesmr.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/bash
  2. # ./applypatchesmr.sh /e/builds/beta-253/253-gitlab/mozilla-release/patches
  3. cd /e/builds/beta-253/comm-release
  4. export IFS=
  5. # git checkout 2_53_9_1_final
  6. git checkout 2_53_10_beta_01
  7. while read -r line || [[ -n "$line" ]]; do
  8. echo "apply patch: $line"
  9. patchfile=$1/$(echo $line)
  10. if [ "$line" = "1602257-gitignore-253.patch" ] ||
  11. [ "$line" = "1602257-2-gitignore-mr-2537.patch" ] ||
  12. [ "$line" = "1421012-59a1.patch" ] ||
  13. [ "$line" = "1635491-1only-killtup-PARTIAL-78a1.patch" ] ||
  14. [ "$line" = "1602261-retsulcksat.patch" ] ||
  15. [ "$line" = "1669850-killmobile-2535.patch" ] ||
  16. [ "$line" = "1464834-1-killservo-62a1.patch" ] ||
  17. [ "$line" = "1464834-1a-killservo-62a1.patch" ] ||
  18. [ "$line" = "1464834-2-killservo-62a1.patch" ] ||
  19. [[ "$line" == PPPP* ]] || [[ "$line" == WIP* ]] ||
  20. [[ "$line" == 9999999* ]] ;
  21. then
  22. echo "patch $line skipped"
  23. else
  24. if [ -f "$patchfile" ]; then
  25. echo "$patchfile exist"
  26. # git apply --check "$patchfile"
  27. # git apply --index --whitespace=nowarn "$patchfile"
  28. # git apply --stat "$patchfile"
  29. git am --patch-format=hg --whitespace=nowarn < "$patchfile"
  30. if [ $? -eq 0 ]
  31. then
  32. echo "ok"
  33. else
  34. echo "error"
  35. git am --abort
  36. exit 1
  37. fi
  38. fi
  39. fi
  40. done < "$1"/series
  41. cd ..