X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=bin%2Fpt;h=303069dbb05240e0af2bac2e93d945efc3c8f9cb;hb=b47b7723332ad1c498ffc54e1765b7122ce020af;hp=5ab4cb0faf17e126260e2030a4e15183ce04399c;hpb=0b03071b674153775d6979f7f1935fb3f3f295d7;p=pt.git diff --git a/bin/pt b/bin/pt index 5ab4cb0..303069d 100755 --- a/bin/pt +++ b/bin/pt @@ -1,7 +1,7 @@ #!/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 @@ -9,12 +9,10 @@ # (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= @@ -32,7 +30,7 @@ Version() { # 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." @@ -51,7 +49,9 @@ Usage() { echo " remove [ [...]] -- remove port(s)" echo " clean [ [...]] -- 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 -- search for port(s)" echo " list -- list port(s)" echo " info -- display details of a port" @@ -787,7 +787,8 @@ Status() { [ "$1" = "" ] \ && Msg -n "Ports base version: " \ || Msg -n "$1: " - version=$( port --version /dev/null | grep "MacPorts" ) + [ $? -eq 0 ] || version=$( port version | cut -d' ' -f2 ) Msg "$version" QUIET=$q return $r @@ -916,6 +917,22 @@ case "$1" in 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