diff options
| author | Felix Fietkau <nbd@openwrt.org> | 2006-10-10 15:30:50 +0000 |
|---|---|---|
| committer | Felix Fietkau <nbd@openwrt.org> | 2006-10-10 15:30:50 +0000 |
| commit | af7a470f9c3f0c8546a90ae24a8494d3ee94efd6 (patch) | |
| tree | c2adf76904f7a6a6449131129eac74ec00780dd1 /openwrt/include/shell.sh | |
| parent | c2527c7204b8fdd4638af13d1899013ab262eb28 (diff) | |
| download | mtk-20170518-af7a470f9c3f0c8546a90ae24a8494d3ee94efd6.zip mtk-20170518-af7a470f9c3f0c8546a90ae24a8494d3ee94efd6.tar.gz mtk-20170518-af7a470f9c3f0c8546a90ae24a8494d3ee94efd6.tar.bz2 | |
add support for a common shell include file, which is evaluated for every make shell call, simplify variable passing to the shell with shvar and shexport templates, use Package/<pkgname>/config for adding config.in data
SVN-Revision: 5014
Diffstat (limited to 'openwrt/include/shell.sh')
| -rw-r--r-- | openwrt/include/shell.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/openwrt/include/shell.sh b/openwrt/include/shell.sh new file mode 100644 index 0000000..6ee0cf6 --- /dev/null +++ b/openwrt/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" ] +} |
