summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-10-26 16:18:24 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-10-26 16:18:24 +0000
commitd4754e1eb5ac024d7a8d649aa8b01c85a9e34649 (patch)
treef6421aba8afa66797dc93f7478c51a83d41ff744
parent4aa8c512b06e000dfea796af10ffa1684316c0d5 (diff)
downloadmtk-20170518-d4754e1eb5ac024d7a8d649aa8b01c85a9e34649.zip
mtk-20170518-d4754e1eb5ac024d7a8d649aa8b01c85a9e34649.tar.gz
mtk-20170518-d4754e1eb5ac024d7a8d649aa8b01c85a9e34649.tar.bz2
Revert "include/shell.sh: remove getvar()"
It is more widely used than I thought. Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43068
-rw-r--r--include/shell.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/shell.sh b/include/shell.sh
index a1e5cbe..634beed 100644
--- a/include/shell.sh
+++ b/include/shell.sh
@@ -1,3 +1,7 @@
+getvar() {
+ eval "echo \"\${$1}\""
+}
+
var2file() {
local var
eval "var=\"\${$1}\""