From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75261 invoked by alias); 2 Apr 2019 17:22:03 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 75214 invoked by uid 89); 2 Apr 2019 17:22:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_JMF_BL autolearn=ham version=3.3.1 spammy= X-HELO: rgout05.bt.lon5.cpcloud.co.uk Received: from rgout0502.bt.lon5.cpcloud.co.uk (HELO rgout05.bt.lon5.cpcloud.co.uk) (65.20.0.223) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Apr 2019 17:22:01 +0000 X-OWM-Source-IP: 31.51.207.0 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-SNCR-VADESECURE: CLEAN Received: from localhost.localdomain (31.51.207.0) by rgout05.bt.lon5.cpcloud.co.uk (9.0.019.26-1) (authenticated as jonturney@btinternet.com) id 5C24804F09312C80; Tue, 2 Apr 2019 18:22:01 +0100 From: Jon Turney To: cygwin-apps@cygwin.com Cc: Jon Turney Subject: [PATCH cygport 2/2] Fixup __version_at_least a bit Date: Tue, 02 Apr 2019 17:22:00 -0000 Message-Id: <20190402172139.37384-3-jon.turney@dronecode.org.uk> In-Reply-To: <20190402172139.37384-1-jon.turney@dronecode.org.uk> References: <20190402172139.37384-1-jon.turney@dronecode.org.uk> X-SW-Source: 2019-04/txt/msg00002.txt.bz2 Use the variables we've made containing the separated version components, rather than an undefined one --- lib/check_funcs.cygpart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/check_funcs.cygpart b/lib/check_funcs.cygpart index 07516be..bb35812 100644 --- a/lib/check_funcs.cygpart +++ b/lib/check_funcs.cygpart @@ -699,12 +699,12 @@ __version_at_least() { local -a have_va=(${have_v//[-\._]/ }); local -i n=0; - while defined want_ver[${n}] + while defined want_va[${n}] do - if (( want_ver[n] < ${have_ver[${n}]:-0} )) + if (( want_va[n] < ${have_va[${n}]:-0} )) then return 0; - elif (( want_ver[n] > ${have_ver[${n}]:-0} )) + elif (( want_va[n] > ${have_va[${n}]:-0} )) then return 1; else -- 2.17.0