Date: Mon, 25 Aug 2003 08:05:28 -0700 From: Joshua Oreman <oremanj@get-linux.org> To: Marco Gon?alves <marco@aces.pt> Cc: questions@freebsd.org Subject: Re: Cvsup script question Message-ID: <20030825150528.GA7614@webserver> In-Reply-To: <007a01c36b15$bb0de0c0$6b026b83@marco> References: <002a01c367e1$a1f275b0$04fea8c0@moe> <44ptixyata.fsf@be-well.ilk.org> <007a01c36b15$bb0de0c0$6b026b83@marco>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 25, 2003 at 03:32:25PM +0100 or thereabouts, Marco Gon?alves wrote:
> Hi, i did some minor alterations to the script by
>
> #!/usr/local/bin/bash
>
> /usr/local/bin/cvsup -g -L 0 /etc/cvsupfile # Keep quiet except for errors
> /usr/local/sbin/portsdb -Uu > /dev/null # Hopefully, show only errors
> /usr/local/sbin/pkgdb -aF
> /bin/echo
> /bin/echo "Updated ports:"
> /usr/local/sbin/portversion | grep "<" # Show only changed ports
>
> but strangly, at least for me, is that the 2nd line the output is
> not being redirected to /dev/null and if i execute this script i
> still get lots of output...
I bet portsdb is putting its progress messages on standard output. (Programs
seem to do that a lot, since stderr is unbuffered). Try:
/usr/local/sbin/portsdb -Uu >/dev/null 2>&1 || { echo "FAILED to run portsdb"; exit 1 }
That will not give you the error output, but if there's an error it will say so and exit.
(You can run portsdb manually and see!)
-- Josh
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030825150528.GA7614>
