patch-it 228 B

123456789101112
  1. #!/bin/bash
  2. for file in `tree -if --noreport | egrep "\.(patch|patch1|diff)$"`; do
  3. echo Apply $file
  4. patch -p1 < $file
  5. if [ $? != 0 ]; then
  6. echo "Failed to patch $file"
  7. exit 1
  8. fi
  9. done
  10. echo "Done"