From owner-svn-src-all@FreeBSD.ORG Tue Oct 22 18:55:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 25E878F0; Tue, 22 Oct 2013 18:55:53 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE6B02F7C; Tue, 22 Oct 2013 18:55:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9MItqWZ088926; Tue, 22 Oct 2013 18:55:52 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9MItqPg088924; Tue, 22 Oct 2013 18:55:52 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201310221855.r9MItqPg088924@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 22 Oct 2013 18:55:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256923 - head/usr.sbin/portsnap/portsnap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Oct 2013 18:55:53 -0000 Author: gavin Date: Tue Oct 22 18:55:52 2013 New Revision: 256923 URL: http://svnweb.freebsd.org/changeset/base/256923 Log: Rename the "alfred" command to "auto", and document it. Retain support for "portsnap alfred" for now. Discussed: many times, most recently on svn-src-all MFC after: 1 week Modified: head/usr.sbin/portsnap/portsnap/portsnap.8 head/usr.sbin/portsnap/portsnap/portsnap.sh Modified: head/usr.sbin/portsnap/portsnap/portsnap.8 ============================================================================== --- head/usr.sbin/portsnap/portsnap/portsnap.8 Tue Oct 22 18:39:43 2013 (r256922) +++ head/usr.sbin/portsnap/portsnap/portsnap.8 Tue Oct 22 18:55:52 2013 (r256923) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 14, 2012 +.Dd October 22, 2013 .Dt PORTSNAP 8 .Os FreeBSD .Sh NAME @@ -161,6 +161,18 @@ or commands. Again, note that in the parts of the ports tree which are being updated, any local changes or additions will be removed. +.It auto +Run +.Cm fetch +or +.Cm cron +depending on whether stdin is a terminal; then run +.Cm update +or +.Cm extract +depending on whether +.Ar portsdir +exists. .El .Sh TIPS .Bl -bullet Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh ============================================================================== --- head/usr.sbin/portsnap/portsnap/portsnap.sh Tue Oct 22 18:39:43 2013 (r256922) +++ head/usr.sbin/portsnap/portsnap/portsnap.sh Tue Oct 22 18:55:52 2013 (r256923) @@ -61,6 +61,8 @@ Commands: files and directories. update -- Update ports tree to match current snapshot, replacing files and directories which have changed. + auto -- Fetch updates, and either extract a new ports tree or + update an existing tree. EOF exit 0 } @@ -147,12 +149,15 @@ parse_cmdline() { if [ ! -z "${SERVERNAME}" ]; then usage; fi shift; SERVERNAME="$1" ;; - cron | extract | fetch | update | alfred) + cron | extract | fetch | update | auto) COMMANDS="${COMMANDS} $1" ;; up) COMMANDS="${COMMANDS} update" ;; + alfred) + COMMANDS="${COMMANDS} auto" + ;; *) if [ $# -gt 1 ]; then usage; fi if echo ${COMMANDS} | grep -vq extract; then @@ -1104,10 +1109,10 @@ cmd_update() { update_run || exit 1 } -# Alfred command. Run 'fetch' or 'cron' depending on +# Auto command. Run 'fetch' or 'cron' depending on # whether stdin is a terminal; then run 'update' or # 'extract' depending on whether ${PORTSDIR} exists. -cmd_alfred() { +cmd_auto() { if [ "${INTERACTIVE}" = "YES" ]; then cmd_fetch else