mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-30 10:42:22 +00:00
84bd74057f
Signed-off-by: Felix Fietkau <nbd@nbd.name>
16 lines
196 B
Bash
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" ]
|
|
}
|