Public bug reported:
The pbuilder-distribution.sh script contains a shell scripting error
which just coincidentally happens to work anyway. I know, "if it ain't
broke, don't fix it", but it's kind of embarrassing, or amusing,
depending on how you look at it.
PROCEED=true
...
if ( $PROCEED == true ) ; then
Turns out that true(1) ignores any arguments, so ( true == true )
returns a zero exit status, but (a) the parens are wasteful and (b) you
are confusing the youngsters with this.
if [ $PROCEED == true ]; then
or
case $PROCEED in true) # do stuff ;; esac
would be the idiomatic way to code that in Bourne shell.
** Affects: pbuilder (Ubuntu)
Importance: Untriaged
Status: Unconfirmed
--
examples/pbuilder-distribution.sh: Funny shell error
https://launchpad.net/bugs/57284
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs