01-check-for-dot-orig-files 439 B

12345678910111213141516171819202122
  1. #! /bin/sh
  2. set -e
  3. echo "Checking for .orig files"
  4. DOT_ORIG_WHITELIST=$(cat <<EOF
  5. /bin/hostname.orig
  6. /etc/resolv.conf.orig
  7. /lib/systemd/system/alsa-utils.service.orig
  8. /sbin/start-stop-daemon.orig
  9. EOF
  10. )
  11. DOT_ORIG_FILES=$(find / -type f -name *.orig | grep -v -F "$DOT_ORIG_WHITELIST" || :)
  12. if [ -n "$DOT_ORIG_FILES" ]; then
  13. echo "Some patches are fuzzy and leave .orig files around:" >&2
  14. echo "$DOT_ORIG_FILES" >&2
  15. exit 1
  16. fi