Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/portupgrade
Path: blob/master/etc/status-pkg.sh
102 views
1
#!/bin/sh -
2
#
3
# status-pkg - a replacement of the weekly status-pkg report script
4
#
5
6
# If there is a global system configuration file, suck it in.
7
#
8
if [ -r /etc/defaults/periodic.conf ]
9
then
10
. /etc/defaults/periodic.conf
11
source_periodic_confs
12
fi
13
14
localbase=/usr/local
15
16
case "$weekly_status_pkg_enable" in
17
[Yy][Ee][Ss])
18
echo ""
19
echo "Check for out of date packages:"
20
21
rc=$($localbase/sbin/portversion -vOL '=' |
22
sed -e 's/^/ /' |
23
tee /dev/stderr |
24
wc -l)
25
if [ $rc -gt 1 ]
26
then
27
rc=1
28
echo ""
29
echo " Run '$localbase/sbin/portversion -c' to produce an updater script."
30
fi;;
31
32
*) rc=0;;
33
esac
34
35
exit $rc
36
37