From 37597db597c517498165946a141d6192560acf0e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 2 Dec 2024 20:51:28 +0100 Subject: Second commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- ffget-audio-extension | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'ffget-audio-extension') diff --git a/ffget-audio-extension b/ffget-audio-extension index 7f0156f..8feca81 100755 --- a/ffget-audio-extension +++ b/ffget-audio-extension @@ -8,16 +8,10 @@ usage () { exit 1 } -while test "${1::1}" = '-'; do - if test "${1}" = '--'; then - shift - break - elif test "${1}" = '-'; then - break - else - usage - fi +while getopts '' flag; do + usage done +shift $(( ${OPTIND} - 1 )) if test ! $# = 1; then usage -- cgit v1.2.3-70-g09d2