]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/tools/portsinfo/portsinfo.sh
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / tools / portsinfo / portsinfo.sh
1 #!/bin/sh
2 # Copyright (c) April 1997 Wolfram Schneider <wosch@FreeBSD.org>, Berlin.
3 #
4 # portsinfo - Generate list of new ports for last two weeks.
5 #
6 # $FreeBSD$
7
8 PATH=/bin:/usr/bin:/usr/local/bin:$PATH; export PATH
9
10 host=http://www.freebsd.org
11 url=$host/cgi/ports.cgi
12 time='?type=new&time=2+week+ago&sektion=all'
13 time2='?type=changed&time=2+week+ago&sektion=all'
14 info=yes
15
16 if [ x"$info" = xyes ]; then
17
18 cat <<'EOF'
19 Introduction
20 ------------
21
22 The FreeBSD Ports Collection offers a simple way for users and
23 administrators to install applications. Each "port" listed here
24 contains any patches necessary to make the original application source
25 code compile and run on FreeBSD. Installing an application is as
26 simple as downloading the port, unpacking it and typing make in the
27 port directory. The Makefile automatically fetches the application
28 source code, either from a local disk or via ftp, unpacks it on your
29 system, applies the patches, and compiles. If all goes well, simply
30 type make install to install the application.
31
32 For more information about using ports, see the ports collection
33
34         http://www.freebsd.org/handbook/ports.html
35 and
36         http://www.freebsd.org/ports/
37
38 EOF
39
40     lynx -dump $host/ports/ |
41         perl -ne '/^[ ]*There are currently/ && s/^\s+// && print && exit'
42
43 cat <<EOF
44
45
46 New ports added last two weeks
47 ------------------------------
48
49 EOF
50
51
52 fi
53
54
55 lynx -nolist -dump -reload -nostatus "$url$time" | 
56     grep -v "Description :" |
57 perl -ne 'print if (/^\s*Category/ .. /__________________/)' |
58     grep -v ________ | 
59 perl -ne 'if (/^\s*Category/) { 
60                 print; for(1..50) {print "="}; print "\n";
61           } else { print}'
62
63 cat <<EOF
64
65
66 Updated ports last two weeks
67 -----------------------------------
68
69 EOF
70
71 lynx -nolist -dump -reload -nostatus "$url$time2" |
72     grep -v "Description :" |
73 perl -ne 's/\[INLINE\]\s*//g; print if (/Category/ .. /XXXXYYYYZZZZ/)' |      
74 perl -ne 'if (/^\s*Category/) {
75                 print; for(1..50) {print "="}; print "\n";
76           } else { print}'
77
78 cat <<EOF
79
80 This information was produced by
81         $url
82
83 EOF
84