1
0
mirror of https://github.com/albfan/bash-ini-parser.git synced 2025-08-06 07:02:37 +03:00

add dynamic DEBUG

This commit is contained in:
albfan
2018-01-22 22:44:37 +01:00
parent 6e2175dc72
commit 2ddf0abc5c
2 changed files with 11 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
## bash-ini-parser [![Build Status](https://travis-ci.org/albfan/bash-ini-parser.svg?branch=master)](https://travis-ci.org/albfan/bash-ini-parser)
## bash-ini-parser
[![Build Status](https://travis-ci.org/albfan/bash-ini-parser.svg?branch=master)](https://travis-ci.org/albfan/bash-ini-parser)
A ini file parser for bash relying only on builtins
@@ -84,6 +85,10 @@ Outputs:
var4 value is "pivo"
### Debugging
declare `BASH_INI_PARSER_DEBUG` and parse will output the ini file processing
### Drawbacks
This is more a hack than a reliable parser, so keep in mind things like

View File

@@ -5,7 +5,11 @@
PREFIX="cfg_section_"
function debug {
return #abort debug
if ! [ -v "BASH_INI_PARSER_DEBUG" ]
then
#abort debug
return
fi
echo $*
echo --start--
echo "${ini[*]}"