Last change
on this file since 183 was 182, checked in by Rick van der Zwet, 14 years ago |
Make it more user friendly
|
-
Property svn:executable
set to
*
|
File size:
885 bytes
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | # FreeBSD system upgade script
|
---|
3 | #
|
---|
4 | # Licence: BSDLike - http://rickvanderzwet.nl/LICENSE
|
---|
5 | # Rick van der Zwet <info@rickvanderzwet.nl>
|
---|
6 |
|
---|
7 | . /etc/rc.subr
|
---|
8 |
|
---|
9 | if [ `id -u` -ne 0 ]; then
|
---|
10 | echo "Sorry root only" 1>&2
|
---|
11 | exit 128
|
---|
12 | fi
|
---|
13 |
|
---|
14 | DIRNAME=`dirname $0`
|
---|
15 | BATCH=${BATCH-""}
|
---|
16 |
|
---|
17 | $DIRNAME/port-list.sh
|
---|
18 |
|
---|
19 | # Update port tree
|
---|
20 | echo "# Updating portstree .."
|
---|
21 | portsnap update
|
---|
22 |
|
---|
23 | # Update ports listing
|
---|
24 | echo "# Checking ports which needs updating ..."
|
---|
25 | NEWPORTS=`pkg_version -qL=`
|
---|
26 |
|
---|
27 | if [ -z "$NEWPORTS" ]; then
|
---|
28 | echo "# System up2date"
|
---|
29 | exit 0
|
---|
30 | fi
|
---|
31 |
|
---|
32 | if [ -z "$BATCH" ]; then
|
---|
33 | # Make sure we have read the (new) UPDATING announcements
|
---|
34 | less /usr/ports/UPDATING
|
---|
35 |
|
---|
36 | echo $NEWPORTS
|
---|
37 | # And agree to the terms of the game
|
---|
38 | echo -n "Do you like to upgrade the affected ports [no]: "; read INPUT
|
---|
39 |
|
---|
40 | INPUT=${INPUT:-"no"}
|
---|
41 | checkyesno INPUT || exit 1
|
---|
42 | echo "Foo"
|
---|
43 | fi
|
---|
44 |
|
---|
45 | portupgrade -r -mBATCH=yes -a $NEWPORTS
|
---|
Note:
See
TracBrowser
for help on using the repository browser.