PortValhalla/scripts/Common/Scripts/is-truthy.sh

12 lines
206 B
Bash
Raw Normal View History

2023-07-12 20:37:31 +00:00
#!/bin/bash
function isTruthy() {
local value;
value="$1";
[ ! -z "$value" ] &&
[ "$value" != "0" ] &&
[ "$value" != "false" ] &&
[ "$value" != "n" ] &&
[ "$value" != "no" ];
}