Changeset 182 for freebsd-mgnt


Ignore:
Timestamp:
Sep 22, 2010, 9:02:15 AM (14 years ago)
Author:
Rick van der Zwet
Message:

Make it more user friendly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd-mgnt/system-update.sh

    r119 r182  
    44# Licence: BSDLike - http://rickvanderzwet.nl/LICENSE
    55# Rick van der Zwet <info@rickvanderzwet.nl>
     6
     7. /etc/rc.subr
    68
    79if [ `id -u` -ne 0 ]; then
     
    1113
    1214DIRNAME=`dirname $0`
     15BATCH=${BATCH-""}
    1316
    1417$DIRNAME/port-list.sh
    1518
    1619# Update port tree
     20echo "# Updating portstree .."
    1721portsnap update
    1822
    19 # Update ports
     23# Update ports listing
     24echo "# Checking ports which needs updating ..."
    2025NEWPORTS=`pkg_version -qL=`
     26
     27if [ -z "$NEWPORTS" ]; then
     28  echo "# System up2date"
     29  exit 0
     30fi
     31
     32if [ -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"
     43fi
     44
    2145portupgrade -r -mBATCH=yes -a $NEWPORTS
Note: See TracChangeset for help on using the changeset viewer.