public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [RFC] Bourne shell command library
Date: Thu, 13 Aug 2009 03:39:50 -0400	[thread overview]
Message-ID: <200908130339.51018.vapier@gentoo.org> (raw)
In-Reply-To: <364299f40908022332q29608627vb36b1c5c7c996b93@mail.gmail.com>


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

On Monday 03 August 2009 02:32:59 Garrett Cooper wrote:
> export SHELL_DEBUG=${SHELL_DEBUG:=0}

does this really need to be exported ?  otherwise, the simpler way to write a 
default value is:
: ${SHELL_DEBUG:=0}

there are a bunch of places this can be fixed in this file

> exists()
> {
>     for cmd in $@; do

you should always use "$@", not $@.  if you actually want $@, then you should 
use $* to keep things clear.

>         if ! which $cmd 2>&1 1>/dev/null; then

which is not portable.  use `type` or `command`.  $cmd should be quoted.

>     TCID=${TCID:=}
>     [ -z "$TCID" ] && TCID=${0##*/}

does this really need to be two lines ?
-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 --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

      parent reply	other threads:[~2009-08-13  7:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-03  6:32 [LTP] [RFC] Bourne shell command library Garrett Cooper
2009-08-03 11:35 ` Garrett Cooper
2009-08-13  7:39 ` Mike Frysinger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200908130339.51018.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox