diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-10-13 20:51:49 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-10-13 20:51:49 +0000 |
commit | 5b2f37e0cd7ef98a06611fb42b947d8984f0e12a (patch) | |
tree | d993cf48b4d89166701fe2f33976389d7634235d /include/shell.sh | |
parent | 79c3b44dbfbd6fb819a0daf64c2b797c29b04d85 (diff) | |
parent | 4b8e77121f1bcca81025c3fcb7b87bf869bef7f9 (diff) | |
download | upstream-5b2f37e0cd7ef98a06611fb42b947d8984f0e12a.tar.gz upstream-5b2f37e0cd7ef98a06611fb42b947d8984f0e12a.tar.bz2 upstream-5b2f37e0cd7ef98a06611fb42b947d8984f0e12a.zip |
finally move buildroot-ng to trunk
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5059 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include/shell.sh')
-rw-r--r-- | include/shell.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/shell.sh b/include/shell.sh new file mode 100644 index 0000000000..6ee0cf6030 --- /dev/null +++ b/include/shell.sh @@ -0,0 +1,15 @@ +getvar() { + eval "echo \"\${$1}\"" +} + +var2file() { + local var + eval "var=\"\${$1}\"" + if [ -n "$var" ]; then echo "$var" > "$2"; fi +} + +isset() { + local var + eval "var=\"\${$1}\"" + [ -n "$var" ] +} |