#!/bin/bash
#
# pt -- the MacPorts port tool"
-# Copyright (c)2007 Alexander Barton, alex@barton.de
+# Copyright (c)2007-2009 Alexander Barton, alex@barton.de
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# (at your option) any later version.
# Please read the file COPYING, README and AUTHORS for more information.
#
-# $Id$
-#
NAME=`basename "$0"`
-VERSION="0.0.9"
-DATE="2007-11-15"
+VERSION="0.2.0"
+DATE="2008-12-14"
QUIET=
PORT_VERBOSE=
# Display version information.
echo "$NAME $VERSION ($DATE) -- the MacPorts port tool"
- echo "Copyright (c)2007 Alexander Barton, alex@barton.de"
+ echo "Copyright (c)2007-2009 Alexander Barton, alex@barton.de"
echo
echo "This is free software; see the source for copying conditions. There is NO"
echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
echo " remove <port> [<port> [...]] -- remove port(s)"
echo " clean <port> [<port> [...]] -- clean port build files"
echo " update -- update port database"
+ echo " outdated -- list all outdated ports"
echo " upgrade -- upgrade outdated port(s)"
+ echo " freshup -- update port database & list outdated ports"
echo " search <term> -- search for port(s)"
echo " list <term> -- list port(s)"
echo " info <port> -- display details of a port"
[ "$1" = "" ] \
&& Msg -n "Ports base version: " \
|| Msg -n "$1: "
- version=$( port --version </dev/null | grep "MacPorts" )
+ version=$( port --version 2>/dev/null | grep "MacPorts" )
+ [ $? -eq 0 ] || version=$( port version | cut -d' ' -f2 )
Msg "$version"
QUIET=$q
return $r
Upgrade
Clean_Exit $?
;;
+ "freshup"|"fresh")
+ shift
+ Check_Root_Perm
+ [ $# -ne 0 ] && Usage
+ Update
+ List_Outdated
+ Clean_Exit $?
+ ;;
+ "go"|"up")
+ shift
+ Check_Root_Perm
+ [ $# -ne 0 ] && Usage
+ Update
+ Upgrade
+ Clean_Exit $?
+ ;;
"remove"|"uninstall")
shift
Check_Root_Perm