[pacman-dev] [PATCH 1/2] makepkg: clean up test usage
Allan McRae
allan at archlinux.org
Sat Jan 17 23:02:00 EST 2009
Dan McGee wrote:
> In a lot of places, we had the following construct:
> [ "$foobar" = "0" ]
> which is better represented by using the integer tests:
> [ $foobar -eq 0 ]
>
> Attempt to unify makepkg to use the latter rather than the former in all
> places. From here on out we should ensure anything that is set to 0, 1, etc.
> uses the -eq format rather than =.
>
> In addition, fix a few other test anomalies including usage of double
> equals.
In the Advanced Bash-Scripting Guide (http://tldp.org/LDP/abs/html/),
they still use quotes around the variables with -eq. Both seem to work,
so I wonder why?
Otherwise, I have no problems with either of these tidy-up patches.
Allan
More information about the pacman-dev
mailing list