commit:     587d14256d2515ffa63c1236781697606b29efd1
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  1 07:22:12 2025 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sun Jun  1 07:22:12 2025 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/pkgcore.git/commit/?id=587d1425

EAPI=9: introduce edo

Bug: https://bugs.gentoo.org/744880
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 data/lib/pkgcore/ebd/eapi/9/global.bash | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/data/lib/pkgcore/ebd/eapi/9/global.bash 
b/data/lib/pkgcore/ebd/eapi/9/global.bash
index 60ff0acd..3e067a0c 100644
--- a/data/lib/pkgcore/ebd/eapi/9/global.bash
+++ b/data/lib/pkgcore/ebd/eapi/9/global.bash
@@ -1,4 +1,4 @@
-# (c) 2024-2025 Gentoo Authors
+# (c) 2022-2025 Gentoo Authors
 # SPDX-License-Identifier: GPL-2.0-or-later
 
 pipestatus() {
@@ -18,4 +18,20 @@ pipestatus() {
        return "${ret}"
 }
 
+edo() {
+       # copied from edo.eclass
+       local a out regex='[] '\''"\|&;()<>!{}*[?^$`]|^[#~]|[=:]~'
+
+       [[ $# -ge 1 ]] || die "edo: at least one argument needed"
+
+       for a; do
+        [[ ${a} =~ ${regex} || ! ${a} =~ ^[[:print:]]+$ ]] && a=${a@Q}
+        out+=" ${a}"
+    done
+
+       einfon
+       printf '%s\n' "${out:1}" >&2
+       "$@" || die -n "Failed to run command: ${1}"
+}
+
 :

Reply via email to