From ca00b03cb707f399bebf6369a6a86e92b6fa82db Mon Sep 17 00:00:00 2001 From: Darren 'Tadgy' Austin Date: Mon, 12 Aug 2019 00:41:22 +0100 Subject: [PATCH] Fix being able to pipe an INI into the parser. --- parse-ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parse-ini b/parse-ini index a7244fa..71f5165 100755 --- a/parse-ini +++ b/parse-ini @@ -1,5 +1,5 @@ #!/bin/bash -# Bash INI file parser v0.1.0. +# Bash INI file parser v0.1.1. # Copyright (C) 2019 Darren 'Tadgy' Austin . # Licensed under the terms of the GNU General Public Licence version 3. # @@ -115,6 +115,7 @@ parser_getopts() { return 2 ;; --) + shift break ;; --*|-*) @@ -281,7 +282,7 @@ parse_ini() { # If reading from stdin, don't try to open the FD as it's already open. if [[ "$INIFILE" == "-" ]]; then - INIFD="1" + INIFD="0" else # File accessability checks. if [[ ! -e "$INIFILE" ]]; then