From d74ddaf29daa7a66f40cacaccdc844c2484d2aea Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 24 Dec 2018 21:41:16 -0500 Subject: libopkbuild: Initialize OPTIND before getopts See commit 0f5caf14a3124c24f38f340fd6504532f07d9617 for more information. --- (limited to 'lib') diff --git a/lib/metadata.sh b/lib/metadata.sh index e9a30b3..e269368 100644 --- a/lib/metadata.sh +++ b/lib/metadata.sh @@ -54,6 +54,7 @@ ob_parse_version() local distrev_var= local version= + OPTIND=1 while getopts 'u:d:' opt; do case "${opt}" in u) diff --git a/lib/package.sh b/lib/package.sh index 036a37d..6b046a5 100644 --- a/lib/package.sh +++ b/lib/package.sh @@ -66,6 +66,7 @@ ob_parse_package_metadata() local param_name= local param_value= + OPTIND=1 while getopts 'c:' opt; do case "${opt}" in c) @@ -131,6 +132,7 @@ ob_get_binary_packages() local pkg_clean= local orig_text_domain= + OPTIND=1 while getopts 'a:P:' opt; do case "${opt}" in a) -- cgit v0.9.1