mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
ini-tools.sh: Fix ini_has_section()
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
9c21dcbb6b
commit
c59479b6ba
1 changed files with 4 additions and 2 deletions
|
|
@ -36,12 +36,14 @@ ini_value()
|
||||||
|
|
||||||
ini_has_section()
|
ini_has_section()
|
||||||
{
|
{
|
||||||
ini_section $@ | grep -q .
|
local inifile="$1"
|
||||||
|
local sec="$2"
|
||||||
|
grep -q "^ *\[$sec\]" $inifile || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
ini_has_value()
|
ini_has_value()
|
||||||
{
|
{
|
||||||
ini_value $@ | grep -q .
|
ini_value $@ | grep -q .
|
||||||
}
|
}
|
||||||
|
|
||||||
ini_escape()
|
ini_escape()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue