aboutsummaryrefslogtreecommitdiffstats
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
commit0cc57816cfce504c4509adcc2e8c8ea8a7f67a08 (patch)
tree25978d32aa73197a610ec83e6514d475164951bb
parent23700aa6658195af4f6a63830abfd43993e7fae3 (diff)
downloadupstream-0cc57816cfce504c4509adcc2e8c8ea8a7f67a08.tar.gz
upstream-0cc57816cfce504c4509adcc2e8c8ea8a7f67a08.tar.bz2
upstream-0cc57816cfce504c4509adcc2e8c8ea8a7f67a08.zip
Revert "include/shell.sh: remove getvar()"
It is more widely used than I thought. Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43068 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--include/shell.sh4
1 files changed, 4 insertions, 0 deletions
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}\""