of '.' is easier on the eyes, 'x' does seem more common and old-dog
shell programmers kind of expect it. It's also easier to search for in
vi :)
Some may question why we need to wrap or protect if we are sure that
the $var isn't null, but it really doesn't cost that much for the
extra insurance and it stops people from having to shift "mental gears"
when they run across such statements.
Some may question why even bother with a consistant style... I think
it's important to write readable code and understandable code and code
that others can maintain easily. A consistant style, IMO, helps this
effort. It also just plain looks better :)
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@82675
13f79535-47bb-0310-9956-
ffa450edef68
echo "ERROR: Failed to build Apache. See \"build.log\" for details."
exit 1;
else
- if [ ".$GTAR" != . ]
+ if [ "x$GTAR" != "x" ]
then
$GTAR -zcf ../apache-$VER-$OS.tar.gz -C .. --owner=root --group=root apache-$VER
else
- if [ ".$TAR" != . ]
+ if [ "x$TAR" != "x" ]
then
$TAR -cf ../apache-$VER-$OS.tar -C .. apache-$VER
- if [ ".$GZIP" != . ]
+ if [ "x$GZIP" != "x" ]
then
$GZIP ../apache-$VER-$OS.tar
fi