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
63
63
# Tell the parser which ini file to process. #
64
64
# -------------------------------------------------------------------------------- #
65
65
66
+ process_ini_file ' complete-example.conf'
67
+ global_reset
66
68
process_ini_file ' complete-example.conf'
67
69
68
70
# -------------------------------------------------------------------------------- #
Original file line number Diff line number Diff line change @@ -259,6 +259,20 @@ function unescape_string()
259
259
echo " ${orig} "
260
260
}
261
261
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
+
262
276
# -------------------------------------------------------------------------------- #
263
277
# Parse ini file #
264
278
# -------------------------------------------------------------------------------- #
You can’t perform that action at this time.
0 commit comments