-
Notifications
You must be signed in to change notification settings - Fork 1
/
daily_updates.sh
61 lines (52 loc) · 928 Bytes
/
daily_updates.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
reset && clear
if [ "$EUID" -ne 0 ]
then
tput bold
echo "Please run as root"
tput sgr0
exit
fi
tput bold
echo
echo "[ Updating /usr/ports git tree... ]"
echo
tput sgr0
cd /usr/ports && git pull
tput bold
echo
echo "[ Updating /usr/src git tree... ]"
echo
tput sgr0
cd /usr/src && git pull
tput bold
echo
echo "[ Updating FreeBSD pkg repos... ]"
echo
tput sgr0
pkg update
echo
tput bold
echo "[ Cleaning port distfiles... ]"
echo
tput sgr0
/usr/local/sbin/portmaster -y --clean-distfiles
tput bold
echo "[ Cleaning stale port packages... ]"
echo
tput sgr0
/usr/local/sbin/portmaster -y --clean-packages
tput bold
echo "[ Checking for stale entries in /var/db/ports... ]"
echo
tput sgr0
/usr/local/sbin/portmaster -v --check-port-dbdir
tput bold
echo "[ Checking portmaster for any upgrades... ]"
echo
tput sgr0
/usr/local/sbin/portmaster -adyG
tput bold
echo "[ All done! ]"
echo
tput sgr0