diff options
author | gavin <gavin@FreeBSD.org> | 2013-10-22 18:55:52 +0000 |
---|---|---|
committer | gavin <gavin@FreeBSD.org> | 2013-10-22 18:55:52 +0000 |
commit | bb2f04b00e06c155f443d7f89468c31fc0f0a5ed (patch) | |
tree | 3b655d2af62dc17ba9280b0f7b6c2d36a3df3fe4 /usr.sbin/portsnap | |
parent | 3a45219eeb6feceb7124874e73f8d18cd22cc72d (diff) | |
download | FreeBSD-src-bb2f04b00e06c155f443d7f89468c31fc0f0a5ed.zip FreeBSD-src-bb2f04b00e06c155f443d7f89468c31fc0f0a5ed.tar.gz |
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
Diffstat (limited to 'usr.sbin/portsnap')
-rw-r--r-- | usr.sbin/portsnap/portsnap/portsnap.8 | 14 | ||||
-rw-r--r-- | usr.sbin/portsnap/portsnap/portsnap.sh | 11 |
2 files changed, 21 insertions, 4 deletions
diff --git a/usr.sbin/portsnap/portsnap/portsnap.8 b/usr.sbin/portsnap/portsnap/portsnap.8 index baa1a57..0e9bd7e 100644 --- a/usr.sbin/portsnap/portsnap/portsnap.8 +++ b/usr.sbin/portsnap/portsnap/portsnap.8 @@ -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 diff --git a/usr.sbin/portsnap/portsnap/portsnap.sh b/usr.sbin/portsnap/portsnap/portsnap.sh index 14e5441..1cc2da8 100644 --- a/usr.sbin/portsnap/portsnap/portsnap.sh +++ b/usr.sbin/portsnap/portsnap/portsnap.sh @@ -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 |