Re: [LTP] fix mail_tests for systems without mail installed

Mike Frysinger
2009-08-13T07:05:04Z

[-- Attachment #1.1: Type: text/plain, Size: 484 bytes --]

On Wednesday 12 August 2009 17:14:09 Paul Larson wrote:
> +`which mail`
> +if [ $? != 0 ]; then

this results in pretty ugly output, and the return value/output of `which` is
not portable. use the type builtin instead.

> + MAIL_NOT_INSTALLED=1

you should make sure this is always set/unset at the top of the script so
parent environment poisoning wont screw things up.

> +if [ -z $MAIL_NOT_INSTALLED ]; then

tests must always be quoted:
[ -z "$foo" ]
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 355 bytes --]

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]