File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ source "${SCRIPTPATH}"/src/ini-file-parser.sh
6363# Tell the parser which ini file to process. #
6464# -------------------------------------------------------------------------------- #
6565
66+ process_ini_file ' complete-example.conf'
67+ global_reset
6668process_ini_file ' complete-example.conf'
6769
6870# -------------------------------------------------------------------------------- #
Original file line number Diff line number Diff line change @@ -259,6 +259,20 @@ function unescape_string()
259259 echo " ${orig} "
260260}
261261
262+ # -------------------------------------------------------------------------------- #
263+ # Global Reset #
264+ # -------------------------------------------------------------------------------- #
265+ # Unset the global sections list, re-initialise it and reset the default section. #
266+ # -------------------------------------------------------------------------------- #
267+
268+ function global_reset()
269+ {
270+ unset sections
271+ sections=()
272+
273+ sections+=(" ${DEFAULT_SECTION} " )
274+ }
275+
262276# -------------------------------------------------------------------------------- #
263277# Parse ini file #
264278# -------------------------------------------------------------------------------- #
You can’t perform that action at this time.
0 commit comments