ini-tools.sh: Now not passing inifile as global variable any longer

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2016-11-02 09:49:34 +00:00
commit 0b3332cc56
3 changed files with 63 additions and 28 deletions

View file

@ -5,6 +5,16 @@ dir=`dirname $0`
inifile=$1
. $dir/ini-tools.sh
cfg_section()
{
cfg_section "$inifile" $@
}
cfg_value()
{
cfg_value "$inifile" $@
}
cat << EOT
format_depends()
{
@ -34,22 +44,22 @@ control()
cat << EOF
Source: \$NAME
Maintainer: Jan Lindemann <jan@janware.com>
Section: `ini_value global.group`
Section: `cfg_value global.group`
Priority: optional
Standards-Version: 3.9.2
Build-Depends: debhelper (>= 9)
EOT
ini_value global.subpackages | grep -q run && cat << EOT
cfg_value global.subpackages | grep -q run && cat << EOT
Package: \$NAME-run
Architecture: any
Depends: \`format_depends "\${shlibs:Depends}, \${misc:Depends}, \$REQUIRES_RUN"\`
Description: `ini_value summary`
`ini_value description | sed 's/^/ /'`
Description: `cfg_value summary`
`cfg_value description | sed 's/^/ /'`
EOT
ini_value global.subpackages | grep -q devel && cat << EOT
cfg_value global.subpackages | grep -q devel && cat << EOT
Package: \$NAME-devel
Architecture: any