Update 2023-09-12 22:25 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id
2023-09-12 22:25:33 +02:00
parent a442d37d55
commit 76aeb5288c
4 changed files with 66 additions and 17 deletions

View File

@@ -3,12 +3,50 @@
[ -z "$1" ] && exit 0
cd /usr/ports/$1
FOUND=0
show() {
echo
echo "+--------------------------------------------------------------------"
printf "| Package: $PWD\n" | sed 's|/usr/ports/||g'
echo "+--------------------------------------------------------------------"
make show="COMMENT FULLPKGNAME HOMEPAGE SITES MAINTAINER DESCR" \
| tr -s " " \
| awk 'NR == 1 { print "| COMMENT: "$0 } \
NR == 2 { print "| DISTNAME: "$0 } \
NR == 3 { print "| HOMEPAGE: "$0 } \
NR == 4 { print "| SITES: "$0 } \
NR == 5 { print "| MAINTAINER: "$0 } \
NR == 5 { print "+--------------------------------------------------------------------" } \
NR == 6 { print "\nDESCRIPTION: "; system("/bin/cat " $0); }'
}
showsub() {
count=0
find * \
-type d \
-maxdepth 0 \
| grep -vE distfiles\|pobj\|plist\|CVS\|.git \
| while read line
do
if [ -d $line/pkg ] \
&& [ -f $line/Makefile ]
then
(cd $line && show)
count=$(( count + 1 ))
fi
if [ $count -gt 10 ]
then
break
fi
done
}
if [ -d pkg ] \
&& [ -f Makefile ]
then
show
else
showsub
fi
make show="COMMENT FULLPKGNAME HOMEPAGE MASTER_SITES MAINTAINER DESCR" \
| tr -s " " \
| awk 'NR == 1 { print " COMMENT: "$0 } \
NR == 2 { print " DISTNAME: "$0 } \
NR == 3 { print " HOMEPAGE: "$0 } \
NR == 4 { print "MASTER_SITES: "$0 } \
NR == 5 { print " MAINTAINER: "$0 } \
NR == 6 { print "DESCRIPTION: "; system("/bin/cat " $0); }'