From patchwork Thu Jun 1 17:29:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov via arch-projects X-Patchwork-Id: 188 Return-Path: Delivered-To: patchwork@archlinux.org Received: from nymeria.archlinux.org by nymeria.archlinux.org (Dovecot) with LMTP id EQIeDgpPMFmgeAAAtiB/HQ for ; Thu, 01 Jun 2017 19:29:46 +0200 Received: from nymeria.archlinux.org (localhost.localdomain [127.0.0.1]) by nymeria.archlinux.org (Postfix) with ESMTP id 9E1CA40308; Thu, 1 Jun 2017 19:29:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on nymeria.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-4.3 required=2.5 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from luna.archlinux.org (luna.archlinux.org [IPv6:2a01:4f8:160:3033::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by nymeria.archlinux.org (Postfix) with ESMTPS; Thu, 1 Jun 2017 19:29:44 +0200 (CEST) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id EC470213C6; Thu, 1 Jun 2017 17:29:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1496338183; bh=sJGxMDl0EBxd8YQoS+Kq/f65g3t62jgnpleZvLNMTX0=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc; b=Pndna1oo/OdOrvPpU4yC0dfv3zD5VD7olVVL5+zlAIWQQER1u0JHc027o3UbBJXTH DjoRJYtRST5vsTZImmwhaL9JEv3AmbzZVj0v5rLLrXy13CkNMOhy7uO1mFOi1R2MUY bEliSo0ITPAypCI4GELPXimnDVYnUKKvAU9XvckjDzkJB1lIgJL4gdY5pCm6l1T/hJ 8RYRqE4wEzAi6mIOoWa1vpPTh8/hYXgzqiw9S/6oj+CSaPlWrW5k1gU+8GVoD006aN uraviYEqGEQ9Gg/QmhHHRSnLCXOCkMhg/I4GIOdI9nnFkiRcZPrVJ7bFCgDEBRpai6 BdAthrXccs0CfKAt/GZV9ynbHehy/cc7BQ52ztR+zVG+bohAmToBCdDQdpGC75ZizU 986tEkWn48DW/GW9E6yX9V5rt9aR5LvkjvraxXZEw3B2LzNF3hVk/iABGsSq3uTjKP g4WsA06/eQlz8lV87K8ZIkS9iGw6bnOQf069rJC8YSmUFvOEjj+zeT32mg3NfSyP1U Nnl+aiTp04eqC2eijY7qKtzTwf8BH9fjwPo9gsyaocEZATze/xSF+4r2Piw/N2cC09 M6e49nMQf1yQVnM6ORwd35DcM2M33I7G1RATTqlKL2508VIi0p2ujxFGKeqidz/ggM d2ITbVfeskHq3UHr6n4BNarA= Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 126B5208B3 for ; Thu, 1 Jun 2017 17:29:42 +0000 (UTC) Received: from nymeria.archlinux.org (nymeria.archlinux.org [IPv6:2a00:1828:2000:547::2]) by luna.archlinux.org (Postfix) with ESMTPS for ; Thu, 1 Jun 2017 17:29:42 +0000 (UTC) Received: from nymeria.archlinux.org (localhost.localdomain [127.0.0.1]) by nymeria.archlinux.org (Postfix) with ESMTP id 243D540253; Thu, 1 Jun 2017 19:29:39 +0200 (CEST) Received: from mail-lf0-x244.google.com (mail-lf0-x244.google.com [IPv6:2a00:1450:4010:c07::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by nymeria.archlinux.org (Postfix) with ESMTPS; Thu, 1 Jun 2017 19:29:38 +0200 (CEST) Received: by mail-lf0-x244.google.com with SMTP id h4so4759921lfj.3; Thu, 01 Jun 2017 10:29:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=lq883GBdwJvnnQINoE/pbRsNSDZoiS4qzJApoa0nGus=; b=L3HfeFxm8YMwsVB1GsEZFhe2xR1omnu7cMVSs9Nw946M2jRh5/aIvYTVZacSnC7Tbj rYSF2PXNVK1zDCq3Vp3qWaW8hm3pqlZzJ7J2cLYHT4HyRoV9lhSCI49LOZIQ3bAjw/SL SKcn1BpbmqEqtfIqV5B2HvQpWLaA1vu1IsKns72Aq2+hG8kd2i3jtgD3dur9rq5scNug uAq8tSZcvbWxG65VJsNWPcU74J3Y5wxzspsl7G9u+40Jh0cEbiaSXKEMJKjEcpV9VS26 zR85pp2ZhyPrVpjANhpthFynWw9k1+XoTKGPHLn/eKbD6ZozImy9kkduO3Bwxb8vLD+V 8csQ== X-Gm-Message-State: AODbwcAJcCGYhuLVDo1SUMyNC2V3fUsoGitfxhOKlMhDgMflWYp4eMDG jPVeGnIoK8vAYMEm X-Received: by 10.46.69.7 with SMTP id s7mr915934lja.72.1496338178182; Thu, 01 Jun 2017 10:29:38 -0700 (PDT) Received: from erik-mate-1604.lan (90-227-62-61-no75.tbcn.telia.com. [90.227.62.61]) by smtp.gmail.com with ESMTPSA id s26sm4382409ljd.27.2017.06.01.10.29.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Jun 2017 10:29:37 -0700 (PDT) To: dreisner@archlinux.org, arch-projects@archlinux.org Date: Thu, 1 Jun 2017 19:29:17 +0200 Message-Id: <1496338158-3540-1-git-send-email-erik.stromdahl@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [arch-projects] [mkinitcpio][PATCH v2 1/2] functions: add_full_dir: recursive filter X-BeenThere: arch-projects@archlinux.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Arch Linux projects development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Erik Stromdahl via arch-projects Reply-To: Arch Linux projects development discussion Cc: Erik Stromdahl Errors-To: arch-projects-bounces@archlinux.org Sender: "arch-projects" X-UID: 443 Status: X-Keywords: Content-Length: 809 By passing the filter glob in all recursive invocations of add_full_dir, the filtering is performed on all subdirs and not just the top dir. This makes the implementation correspond to the documented behavior in the man page. Signed-off-by: Erik Stromdahl --- functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions b/functions index e35a03b..0c407e9 100644 --- a/functions +++ b/functions @@ -435,7 +435,7 @@ add_full_dir() { add_symlink "$f" "$(readlink "$f")" fi elif [[ -d $f ]]; then - add_full_dir "$f" + add_full_dir "$f" "$filter" elif [[ -f $f ]]; then if [[ $f = $filter ]]; then add_file "$f"