mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
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
This commit is contained in:
15
include/shell.sh
Normal file
15
include/shell.sh
Normal file
@@ -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" ]
|
||||
}
|
||||
Reference in New Issue
Block a user