1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-09-30 16:11:18 +02:00
openwrt/include/shell.sh
2016-03-20 17:29:15 +01:00

16 lines
196 B
Bash

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" ]
}