fix conditional expression to be compatible with linux sh