Question

In the official documentation the AS_IF macro is described pretty much like:

Macro: AS_IF (test1, [run-if-true1], ..., [run-if-false]) 

How can I make test1 include several conditions? (combination of "logical and" and "logical or")

Thanks

Was it helpful?

Solution

The test1 is just a bash command. So it should be used as a regular bash code. For example:

AS_IF ([test "x$a" == "xb" || test "x$a" == "xc"], [echo "test passed"], [echo "test has not passed"]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top