diff options
author | Ulrich Müller <ulm@gentoo.org> | 2022-01-08 12:42:39 +0100 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2022-01-08 12:56:11 +0100 |
commit | 285b2c59ed8234d1480012ca3020cbd4368a9d16 (patch) | |
tree | 90408c2540ea228f54317ce2408ad63a164d9057 /bin | |
parent | Fix canonicalise call in profile module (diff) | |
download | eselect-285b2c59ed8234d1480012ca3020cbd4368a9d16.tar.gz eselect-285b2c59ed8234d1480012ca3020cbd4368a9d16.tar.bz2 eselect-285b2c59ed8234d1480012ca3020cbd4368a9d16.zip |
New global option --root
* bin/eselect.in: New global option --root.
(es_do_help): Document it.
* doc/user-guide.txt:
* man/eselect.1: Document the --root option.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/eselect.in | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/eselect.in b/bin/eselect.in index 5d3fc9b..3422197 100755 --- a/bin/eselect.in +++ b/bin/eselect.in @@ -1,6 +1,6 @@ #!@BASH@ # -*-eselect-*- vim: ft=eselect -# Copyright (c) 2005-2020 Gentoo Authors +# Copyright (c) 2005-2022 Gentoo Authors # # This file is part of the 'eselect' tools framework. # @@ -88,6 +88,8 @@ es_do_help() { write_kv_list_entry "--brief" "Make output shorter" write_kv_list_entry "--colour=<yes|no|auto>" \ "Enable or disable colour output (default 'auto')" + write_kv_list_entry "--root=<path>" \ + "The target root path for eselect's operations" echo # display all available eselect modules do_action modules list @@ -147,6 +149,11 @@ while [[ ${1##--} != "$1" ]]; do [[ -z ${action} ]] || die -q "Too many parameters" action=${1##--} ;; + root=*|root) + # set ROOT and recalculate EROOT + ROOT=${1#*=} + EROOT="${ROOT%${EPREFIX:+/}}${EPREFIX}" + ;; "") # -- indicates end of options shift |