diff options
author | Chris Rees <crees@FreeBSD.org> | 2018-12-17 22:54:56 +0800 |
---|---|---|
committer | Chris Rees <crees@FreeBSD.org> | 2018-12-17 22:54:56 +0800 |
commit | 814b0cc185f421de96d16befd166567920c615a0 (patch) | |
tree | f2ae7db473fbb9c9effe83ffb83b7c4d77e2be50 /Tools | |
parent | 33ee3396a5d26456a0fdd420b1b0574143b0b597 (diff) | |
download | freebsd-ports-gnome-814b0cc185f421de96d16befd166567920c615a0.tar.gz freebsd-ports-gnome-814b0cc185f421de96d16befd166567920c615a0.tar.zst freebsd-ports-gnome-814b0cc185f421de96d16befd166567920c615a0.zip |
Support flavor_EXPIRATION_DATE
Correctly ignore commented dates (why would that exist?)
Handle more neatly when EXPIRATION_DATE is not in the main Makefile
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/rmport | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Tools/scripts/rmport b/Tools/scripts/rmport index 61738ab8aa57..07205bcffb34 100755 --- a/Tools/scripts/rmport +++ b/Tools/scripts/rmport @@ -121,8 +121,9 @@ find_expired() EXPVAR=EXPIRATION_DATE find -H ${PORTSDIR} -mindepth 3 -maxdepth 3 -name "Makefile*" \ - |xargs grep -H "^[^#]*${EXPVAR}" \ - |sed -E "s|${PORTSDIR}/?([^/]+/[^/]+)/Makefile:${EXPVAR}=[[:space:]]*([0-9-]{10})$|\2 \1|g" \ + |xargs grep -H "^[0-9a-zA-Z_]*${EXPVAR}" \ + |grep -v '^#' \ + |sed -E "s|${PORTSDIR}/?([^/]+/[^/]+)/Makefile[^:]*:${EXPVAR}=[[:space:]]*([0-9-]{10})$|\2 \1|g" \ |perl -ne "if ((substr(\$_, 0, 10) cmp '${TODAY}') <= 0) { print(\$_); }" \ |while read expdate catport ; do \ echo -n "${expdate} ${catport}: " ; \ |