commit:     a67cf839e95f15caf47643114c566252ac4d9d4b
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  3 15:30:51 2025 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Wed Mar 26 23:23:33 2025 +0000
URL:        https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=a67cf839

crossdev: Prevent functions.sh from complaining about command line args

Such as -C, which means --clean for crossdev rather than NO_COLOR.

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 crossdev | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/crossdev b/crossdev
index ad1065c..5ab1b9e 100755
--- a/crossdev
+++ b/crossdev
@@ -21,7 +21,13 @@ EROOT=${ROOT%/}"${EPREFIX}"/
 : ${PORTAGE_CONFIGROOT:=${EROOT}}
 CONFIGROOT="${PORTAGE_CONFIGROOT}/etc/portage"
 
+# Prevent functions.sh from complaining about command line arguments like -C,
+# which has a different meaning for crossdev.
+declare -a ARGV=( "${@}" )
+set --
 source "${EPREFIX}"/lib/gentoo/functions.sh || exit 1
+set -- "${ARGV[@]}"
+
 esyslog() { :; }
 die_logs() {
        echo

Reply via email to