header-date.sh 308 B

1234567891011121314151617
  1. #!/bin/sh --
  2. set -ue
  3. self="$(readlink -m "${0}")"
  4. . "${self%/*}/functions.sh.lib"
  5. CURRENT_YEAR="$(date '+%Y')"
  6. header_date() {
  7. sed -n "1{/${CURRENT_YEAR}/!q1}" <"${EBUILD_FILE}" || {
  8. echo "${EBUILD_FILE}: ERROR: header does not contain current YEAR" 1>&2
  9. exit 1
  10. }
  11. }
  12. for_each_ebuild header_date