X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=include%2Fshell.sh;h=6389304c24bdd7f798b3a71f957dbfaad9cfa3e5;hb=c67f94b450ded24675c2794f880d7fe14287bf6c;hp=a1e5cbe66f915a0aeb7e240da20f706cdf568e13;hpb=bfb131c6d559f2a5246b63405a029088dcc370f7;p=openwrt.git diff --git a/include/shell.sh b/include/shell.sh index a1e5cbe66f..6389304c24 100644 --- a/include/shell.sh +++ b/include/shell.sh @@ -1,3 +1,7 @@ +getvar() { + eval "echo \"\${$1}\"" +} + var2file() { local var eval "var=\"\${$1}\"" @@ -28,6 +32,6 @@ trapret() {( md5s() { cat "$@" | ( md5sum 2>/dev/null || - md5 + md5 ) | awk '{print $1}' }