aboutsummaryrefslogtreecommitdiffstats
path: root/include/shell.sh
blob: 6ee0cf6030ac5e0a71d7be1c2438c58ee9724caf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
getvar() {
	eval "echo \"\${$1}\""
}

var2file() {
	local var
	eval "var=\"\${$1}\""
	if [ -n "$var" ]; then echo "$var" > "$2"; fi
}

isset() {
	local var
	eval "var=\"\${$1}\""
	[ -n "$var" ]
}