From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23748 invoked by alias); 7 Jun 2018 16:20:40 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42946 Received: (qmail 25990 invoked by uid 1010); 7 Jun 2018 16:20:40 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm0-f67.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(74.125.82.67):SA:0(-1.9/5.0):. Processed in 0.736562 secs); 07 Jun 2018 16:20:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: doron.behar@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+sXx/yAoIEkQTM3Ym9SVNYA693cLnhMJRVLXzd6KZQc=; b=DmuFZySXWJ+nBYDIKdWmxiq6u+fuGS53fkFIdbgbXWk31awb1WvbcXkEdyVg4f4KKp 8wchdF6aGDxG83yWXQbgoMfLfJAPegZ9ZKlWTD+IVmHuA7ZnIAKcss4gH/AW1kscWHza miv8y1kn0ZwdI2SGf1e0xDyu2tiXJMET/PdohwXj2OV1GTpD/pLHeTZudzorF1V2+RHz /LkMI3w+v5RsflWnXn4Jm9XPX7lAo91DZFqeUQ37Zy3M4MGyg9f6eQZ10ae9R/vNpdGZ 8e65fHaU0g5GurKM5rc2zAL+xvwJYiLjlC4xMpSg+gXVAeepx9SXQaEWtppGrIYbvE/c l1tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=+sXx/yAoIEkQTM3Ym9SVNYA693cLnhMJRVLXzd6KZQc=; b=dc1i0KNQMvBy/F+amtl6+amympQoRn1d6/tobVcFJ490cCe/U+50CIHap+Mcl25Bd2 ze/+ovdF+INcMYNKRS1qul4RGe8JeCFy+oPz8l1lSuRQGo4KrLOlrYznFfECZcVLh9xH J1f8h2phXMHBN1+VCpA6zglZvCwNyvL9vfqZeQSJrOzNA4nrJpD47hnA66mkJ5UfpT2H j84LaVWJn8q9ca75oHk6oPGABMbwaZ25awBZ89N/BeYdX66a86xTljzCYP66tzfvH+WC PlxrS6SK55H0jU7GwRV3UBPVN57O6e6mURTcPpW+nLqjOT6Og6kpLRgsOhq5Y17EZ4iO 7qYA== X-Gm-Message-State: APt69E0MKUEKQzDp5YPwljOz/uyRLMinOgfsKbsk5/s4cZPrI5JsTBiC n4Cs0I43IbKMGBZAJEdyGmSWLWtd X-Google-Smtp-Source: ADUXVKKZawuxBEpTfzP1vfWiv2dUpaFG0P1LiJCOk4J+4dNd2yjqgFNPQLD4ew1/UiTqXy8DLjiJXQ== X-Received: by 2002:a1c:1143:: with SMTP id 64-v6mr2019603wmr.100.1528388436099; Thu, 07 Jun 2018 09:20:36 -0700 (PDT) Date: Thu, 7 Jun 2018 19:20:41 +0300 From: Doron Behar To: zsh-workers@zsh.org Subject: Re: [PATCH 1/1] Squashed commit of the following: Message-ID: <20180607162041.esnzh5cgopobtvfz@NUC.doronbehar.com> Mail-Followup-To: zsh-workers@zsh.org References: <5942.1527504539@thecus> <20180529153821.nmwa5yojlusioxti@NUC.doronbehar.com> <13666.1527631249@thecus> <20180530124707.xp6loetwnplkypk2@NUC.doronbehar.com> <16604.1527694987@thecus> <20180601071850.4z3h6cvkuvva3nby@NUC.doronbehar.com> <20180601133048.m7crvdzodzntxcsq@NUC.doronbehar.com> <31972.1527893117@thecus> <20180605154121.tfrw6oheq3ce6qkr@NUC.doronbehar.com> <18086.1528387199@thecus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <18086.1528387199@thecus> User-Agent: NeoMutt/20180512 On Thu, Jun 07, 2018 at 05:59:59PM +0200, Oliver Kiddle wrote: > Doron Behar wrote: > > The idea with the 1st condition that tests the existence of the > > manifests files, is that if non of them exists (which usually never > > happens if luarocks is installed properly), is that only one of them is > > needed for continuing with the modification date of them vs the cache > > file.. > > Okay, that makes sense. > > > local cache_status=1 > > if [[ -f ${cache_file} ]]; then > > if [[ -f ${user_manifest_file} ]]; then > > if [[ ${user_manifest_file} -nt ${cache_file} ]]; then > > cache_status=0 > > fi > > fi > > if [[ -f ${system_manifest_file} ]]; then > > if [[ ${system_manifest_file} -nt ${cache_file} ]]; then > > cache_status=0 > > else > > cache_status=1 > > As you've initialised cache_status to 1, this else branch is > superfluous. > Correct, all of these ones and zeros negativity probably confused me.. > > fi > > fi > > fi > > return cache_status > > > > Better? > > Yes. Much more readable. > > I look forward to the final function. > > Oliver Sending right away.