[llvm] r206119 - Fix test syntax to work with non-bash /bin/sh.
Duncan P. N. Exon Smith
dexonsmith at apple.com
Sat Apr 12 15:18:07 PDT 2014
On 2014 Apr 12, at 14:13, Joerg Sonnenberger <joerg at bec.de> wrote:
> Author: joerg
> Date: Sat Apr 12 16:13:41 2014
> New Revision: 206119
>
> URL: http://llvm.org/viewvc/llvm-project?rev=206119&view=rev
> Log:
> Fix test syntax to work with non-bash /bin/sh.
>
> Modified:
> llvm/trunk/utils/lit/utils/check-coverage
> llvm/trunk/utils/lit/utils/check-sdist
>
> Modified: llvm/trunk/utils/lit/utils/check-coverage
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/utils/check-coverage?rev=206119&r1=206118&r2=206119&view=diff
> ==============================================================================
> --- llvm/trunk/utils/lit/utils/check-coverage (original)
> +++ llvm/trunk/utils/lit/utils/check-coverage Sat Apr 12 16:13:41 2014
> @@ -9,13 +9,13 @@ if [ ! -f setup.py ] || [ ! -d lit ]; th
> fi
>
> # Parse command line arguments.
> -if [ "$1" == "--generate-html" ]; then
> +if [ "$1" = "--generate-html" ]; then
> GENERATE_HTML=1
> shift
> fi
>
> # If invoked with no arguments, run all the tests.
> -if [ $# == "0" ]; then
> +if [ $# = "0" ]; then
Isn't this better as [ $# -eq 0 ]?
> set -- "tests"
> fi
>
>
> Modified: llvm/trunk/utils/lit/utils/check-sdist
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/utils/check-sdist?rev=206119&r1=206118&r2=206119&view=diff
> ==============================================================================
> --- llvm/trunk/utils/lit/utils/check-sdist (original)
> +++ llvm/trunk/utils/lit/utils/check-sdist Sat Apr 12 16:13:41 2014
> @@ -1,6 +1,6 @@
> #!/bin/sh
>
> -if [ $# == 1 ]; then
> +if [ $# = 1 ]; then
Similarly, [ $# -eq 1 ]?
> cd $1
> fi
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list