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

12 lines
206 B
Bash
Executable file

#!/bin/bash
function isTruthy() {
local value;
value="$1";
[ ! -z "$value" ] &&
[ "$value" != "0" ] &&
[ "$value" != "false" ] &&
[ "$value" != "n" ] &&
[ "$value" != "no" ];
}