From: nbd Date: Sun, 26 Oct 2014 16:18:24 +0000 (+0000) Subject: Revert "include/shell.sh: remove getvar()" X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=ea407fbcf04be7926606d262b9431818b2e9e21c;p=openwrt.git Revert "include/shell.sh: remove getvar()" It is more widely used than I thought. Signed-off-by: Felix Fietkau git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43068 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/include/shell.sh b/include/shell.sh index a1e5cbe66f..634beedcef 100644 --- a/include/shell.sh +++ b/include/shell.sh @@ -1,3 +1,7 @@ +getvar() { + eval "echo \"\${$1}\"" +} + var2file() { local var eval "var=\"\${$1}\""