From patchwork Sat Dec 26 07:27:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 1841 Return-Path: Delivered-To: patchwork@archlinux.org Received: from mail.archlinux.org [2a01:4f9:c010:3052::1] by patchwork.archlinux.org with IMAP (fetchmail-6.4.14) for (single-drop); Sat, 26 Dec 2020 07:30:39 +0000 (UTC) Received: from mail.archlinux.org by mail.archlinux.org with LMTP id VqKIM57m5l/wFgMAK+/4rw (envelope-from ) for ; Sat, 26 Dec 2020 07:30:38 +0000 Received: from luna.archlinux.org (luna.archlinux.org [5.9.250.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id 957A5322988; Sat, 26 Dec 2020 07:30:38 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id A571E2C51F; Sat, 26 Dec 2020 07:30:34 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 2D8282111A for ; Sat, 26 Dec 2020 07:27:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on luna.archlinux.org X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=DKIM_SIGNED=0.1, DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,FREEMAIL_FROM=0.5, RCVD_IN_DNSWL_NONE=-0.0001,SPF_HELO_NONE=0.001, T_DMARC_POLICY_NONE=0.01,T_DMARC_SIMPLE_DKIM=0.01 autolearn=no autolearn_force=no version=3.4.4 X-Spam-BL-Results: [127.0.5.0] [127.0.0.10] [127.0.0.10] Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by luna.archlinux.org (Postfix) with ESMTPS for ; Sat, 26 Dec 2020 07:27:40 +0000 (UTC) Received: by mail-pf1-x431.google.com with SMTP id q22so3505480pfk.12 for ; Fri, 25 Dec 2020 23:27:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=uS7SjVbTbxyH6jEJUgKDaMMl87k3/fGZzQ2tTd0I5HA=; b=T0+cYlSnX49sUQRcNs3YFUcBRNT+e6vfCxvLfDPtKAh9il+IxZXdkudnNAhhmi40+K gRBhms0sYSri1WEwi+k7P6dwfa14Oj8eEvL10czBDhkez2cY2NGsc2aQHATPhbEAgCCf RmwpvCnVZAEP0/blZDcOII1jwFD5lABuSgJ4sff2O9ezzkn1Vj9XY1ny5sSOQiwg2U55 M2MmTPeLO4UEq9/Zyij0VauvirsXD0eQvzCOYRBgwde0xMOGvm2jmB43zXEX3VOnAcLZ dGP2OJRwHbMyoAoEqv67ryZAQhfhzyt8ac73Un2FTJB1SCG39BMwwjgLfLcd/ZBjimkc By8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uS7SjVbTbxyH6jEJUgKDaMMl87k3/fGZzQ2tTd0I5HA=; b=D5baUpGdJIpXYgV1TD4EeeCmWwCbEd4/Dcgc9izGNtVjZ1WTjHu4pruEXI2yn0+K1M dJ6Xk/7hRBH/2w/V4BzwwKOithbz4QJh4lC/0oM6iiPf8CF2vzpXutYEZ2GY2OrmMm5d CwA7hl7o+ZEO65D/u6c+MGvrCrtT4R5Y+oXh4tJqiRO6RVlZyn+SB6ythyih/zrMkwis jOlbsdjDvvlmwfUnJGo7Lm89LorUogzRhEwBAwNKfTbwHBR9D00y/FOsToAH3Fwq0ZXb LJLIBZwrwuPBxBv7vpsZEeXkDJiRZab3Gp6G3cTSB8olqISJLJ6rgUtIl8PklvezLiR6 zZSg== X-Gm-Message-State: AOAM533a/3NXBSAB+2e0th4cqjg6R20dIK00J0hqpO0VVAfsqihAGeQa /WW5kunvyqWLMfyJbaojPHHNVpOiyv8= X-Google-Smtp-Source: ABdhPJxIePMQC4xMzOpzfz7SfmCSvTZx7evcTJ8L5Y3zYeR0amSjId5CJYJFSQ/R9pw+y5iEBMT90A== X-Received: by 2002:aa7:9afb:0:b029:19e:45d8:b102 with SMTP id y27-20020aa79afb0000b029019e45d8b102mr33352935pfp.48.1608967658270; Fri, 25 Dec 2020 23:27:38 -0800 (PST) Received: from archbookpro.hsd1.ca.comcast.net (c-67-188-114-10.hsd1.ca.comcast.net. [67.188.114.10]) by smtp.gmail.com with ESMTPSA id q35sm7234652pjh.38.2020.12.25.23.27.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Dec 2020 23:27:37 -0800 (PST) From: Denton Liu To: pacman-contrib@lists.archlinux.org Subject: [PATCH 1/4] pacdiff: Reindent awk script Date: Fri, 25 Dec 2020 23:27:17 -0800 Message-Id: <7c6223deea2f2270a5b18ed2653669e04f522895.1608967613.git.liu.denton@gmail.com> X-Mailer: git-send-email 2.29.2.889.g5298b911bd In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: pacman-contrib@lists.archlinux.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion list for pacman-contrib development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: pacman-contrib-bounces@lists.archlinux.org Sender: "pacman-contrib" Authentication-Results: mail.archlinux.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=T0+cYlSn; dmarc=pass (policy=none) header.from=gmail.com; spf=none (mail.archlinux.org: domain of pacman-contrib-bounces@lists.archlinux.org has no SPF policy when checking 5.9.250.164) smtp.mailfrom=pacman-contrib-bounces@lists.archlinux.org X-Rspamd-Queue-Id: 957A5322988 X-Spamd-Result: default: False [2.99 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_MISSING_CHARSET(2.50)[]; TO_DN_NONE(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[67.188.114.10:received]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:24940, ipnet:5.9.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_COUNT_FIVE(0.00)[6]; FROM_HAS_DN(0.00)[]; FROM_NEQ_ENVFROM(0.00)[liudenton@gmail.com,pacman-contrib-bounces@lists.archlinux.org]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[pacman-contrib@lists.archlinux.org]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM(-0.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER_MAILLIST(0.00)[] X-Rspamd-Server: mail.archlinux.org The way that the awk script used for fetching files from the pacdb is indented is very misleading. It appears as if the `print $1` is part of the if. Unindent the `print $1` and the following closing brace so that it's obvious that they are part of the while. Signed-off-by: Denton Liu --- src/pacdiff.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pacdiff.sh.in b/src/pacdiff.sh.in index af85abb..c4dbd89 100644 --- a/src/pacdiff.sh.in +++ b/src/pacdiff.sh.in @@ -87,8 +87,8 @@ cmd() { awk '/^%BACKUP%$/ { while (getline) { if (/^$/) { nextfile } - print $1 - } + print $1 + } }' "${pac_db}"/*/files | while read -r bkup; do print_existing "/$bkup.pacnew" print_existing "/$bkup.pacorig"