On 12/5/06, Lucas C. Villa Real <[EMAIL PROTECTED]> wrote:
> On 12/4/06, Jonas Karlsson <[EMAIL PROTECTED]> wrote:
> > +      if [ ! -z "${chrootCompileDir}" ]
> > +      then
> > +         cd "${chrootCompileDir}"
>
> I would suggest to use 'Quiet pushd' (and to add the missing 'Quiet
> popd' afterwards).

I wouldn't. It sounds to me that you just saw the 'cd' in the diff and
applied the "rule of thumb" of preferring pushd/popd over cd. This,
however, is not a temporary switch -- he intends to run the entire
script in that directory. This is akin to "cd $dir" in Compile, a
valid use of cd. Using pushd in this case is actually less readable,
as one expects to find popd nearby and in this case popd would have to
be at the end of the script (ie, useless). pushd and cd are like gosub
vs. goto; there are situations for each.

-- Hisham
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to