From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D1486158086 for ; Thu, 4 Nov 2021 10:33:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D8D8DE0933; Thu, 4 Nov 2021 10:33:45 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B15BEE0933 for ; Thu, 4 Nov 2021 10:33:45 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DAFF8342F6D for ; Thu, 4 Nov 2021 10:33:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2D78B1A0 for ; Thu, 4 Nov 2021 10:33:41 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1636021176.c4ea896a322a84876a92bc530ef506c098f40c2c.vapier@gentoo> Subject: [gentoo-commits] proj/elt-patches:master commit in: / X-VCS-Repository: proj/elt-patches X-VCS-Files: eltpatch.in X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: c4ea896a322a84876a92bc530ef506c098f40c2c X-VCS-Branch: master Date: Thu, 4 Nov 2021 10:33:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ab4c8add-2ab5-43ff-986f-52085b2e6c58 X-Archives-Hash: 7f246c778f34bd2979b7842704b59fb6 commit: c4ea896a322a84876a92bc530ef506c098f40c2c Author: Mike Frysinger gentoo org> AuthorDate: Thu Nov 4 10:19:36 2021 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Thu Nov 4 10:19:36 2021 +0000 URL: https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=c4ea896a eltpatch: allow ELT_patchdir to be overridden via env This will allow for local testing. Signed-off-by: Mike Frysinger gentoo.org> eltpatch.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eltpatch.in b/eltpatch.in index 887fc6f..7d3980e 100644 --- a/eltpatch.in +++ b/eltpatch.in @@ -7,6 +7,8 @@ type -P gfind &>/dev/null && FIND=gfind || FIND=find type -P gpatch &>/dev/null && PATCH=gpatch || PATCH=patch type -P gsed &>/dev/null && SED=gsed || SED=sed +: "${ELT_patchdir:=@ELT_patchdir@}" + source "@ELT_gentoofuncs@" || exit 1 die() { @@ -74,7 +76,7 @@ ELT_walk_patches() { local ret=1 local file=$1 local patch_set=$2 - local patch_dir="@ELT_patchdir@/${patch_set}" + local patch_dir="${ELT_patchdir}/${patch_set}" local rem_int_dep=$3 [[ -z ${patch_set} ]] && return 1 @@ -88,7 +90,7 @@ ELT_walk_patches() { sed_args+=( -e "s|@REM_INT_DEP@|${rem_int_dep}|g" ) fi - pushd "@ELT_patchdir@" >/dev/null || die "pushd to elt-patch dir failed" + pushd "${ELT_patchdir}" >/dev/null || die "pushd to elt-patch dir failed" # Go through the patches in reverse order (newer version to older) for patch in $(${FIND} "${patch_set}" -maxdepth 1 -type f | LC_ALL=C sort -r) ; do