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 | 77acae652fa5607fc76b07ce3ce558e8a845de30 (patch) | |
tree | 6156097aa76c3eb354e5af3e97c1857f2acf998a /include/shell.sh | |
parent | 443d4b872619902bb2457c5e2dbdb9e9786a9b14 (diff) | |
download | upstream-77acae652fa5607fc76b07ce3ce558e8a845de30.tar.gz upstream-77acae652fa5607fc76b07ce3ce558e8a845de30.tar.bz2 upstream-77acae652fa5607fc76b07ce3ce558e8a845de30.zip |
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
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@5014 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" ] +} |