diff options
author | gavan <gavan@pkgsrc.org> | 2003-08-19 09:35:26 +0000 |
---|---|---|
committer | gavan <gavan@pkgsrc.org> | 2003-08-19 09:35:26 +0000 |
commit | 44c0f50903a483d9950c9b65d4d3cbc294f55d4a (patch) | |
tree | 8a525a92aa97aaac9f30cc258fa5ebe355b1c355 | |
parent | cd047a151d82d975a68d6f088e3dcc04d69edd15 (diff) | |
download | pkgsrc-44c0f50903a483d9950c9b65d4d3cbc294f55d4a.tar.gz |
Remove dependence on ident and awk. This aids portability to Solaris.
-rw-r--r-- | mk/bulk/post-build | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/mk/bulk/post-build b/mk/bulk/post-build index d8a45347865..69877942698 100644 --- a/mk/bulk/post-build +++ b/mk/bulk/post-build @@ -1,5 +1,5 @@ #!/usr/pkg/bin/perl -# $NetBSD: post-build,v 1.23 2003/08/18 19:19:33 cjep Exp $ +# $NetBSD: post-build,v 1.24 2003/08/19 09:35:26 gavan Exp $ # # Collect stuff after a pkg bulk build # @@ -137,15 +137,25 @@ while (<BF>) { $nunpackaged++; } - # The idea of this is stolen from bsd.pkg.mk's - # show-pkgtools-version target - thanks Al! :-) - $whofile = `find ${USR_PKGSRC}/${pkg} -type f -print | xargs ident 2>/dev/null | awk '\$1 ~ /\\\$NetBSD/ { gsub("/", "", \$4); print \$4 " " \$6 " " \$2 }' | sort -n | tail -n 1 | awk '{ print \$2 " " \$3 }' `; - $whofile=~s/,v$//; - chomp($whofile); - ($who,$file) = split(/\s+/, $whofile); + @idents = `find ${USR_PKGSRC}/${pkg} -type f -print | xargs grep \\\$NetBSD`; + $datetime = ""; + $who = "nobody"; + $file = ""; + $ver = ""; + foreach $ident (@idents) { + $ident =~ /\$NetBSD: post-build,v 1.24 2003/08/19 09:35:26 gavan Exp $/; + if ("$3 $4" gt $datetime) { + $datetime = "$3 $4"; + $who = $5; + $file = $1; + $ver = $1; + } + } - # $maintainer=`( cd $USR_PKGSRC/$pkg ; ( echo '.include "Makefile"' ; echo 'bla: ; \@echo ${MAINTAINER}' ) | $ENV{"BMAKE"} -f - bla )`; - $maintainer=`grep ^MAINTAINER $USR_PKGSRC/$pkg/Makefile | awk '{ print \$2\$3\$4\$5\$6}' | sed -e 's/\</</g' -e 's/\>/>/g'`; + $maintainer=`grep ^MAINTAINER $USR_PKGSRC/$pkg/Makefile`; + $maintainer =~ s/MAINTAINER=[ \t]*//; + $maintainer =~ s/</</g; + $maintainer =~ s/>/>/g; chomp($maintainer); print HTML "<TR><TD><A HREF=\"$bf\">$pkg</A>"; |