blob: 6ee0cf6030ac5e0a71d7be1c2438c58ee9724caf [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001getvar() {
2 eval "echo \"\${$1}\""
3}
4
5var2file() {
6 local var
7 eval "var=\"\${$1}\""
8 if [ -n "$var" ]; then echo "$var" > "$2"; fi
9}
10
11isset() {
12 local var
13 eval "var=\"\${$1}\""
14 [ -n "$var" ]
15}