diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-08-05 04:04:54 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-08-05 04:04:54 -0400 |
commit | db595876a93d194b2ac98c9e1804d0772edb1635 (patch) | |
tree | 1d0f1b5266f509f6b1ede28be0c949183f8e73f0 /gcc.eselect | |
parent | gcc-config: quote expanded paths (diff) | |
download | gcc-config-db595876a93d194b2ac98c9e1804d0772edb1635.tar.gz gcc-config-db595876a93d194b2ac98c9e1804d0772edb1635.tar.bz2 gcc-config-db595876a93d194b2ac98c9e1804d0772edb1635.zip |
gcc.eselect: add an eselect modulev1.9.0
This wraps gcc-config so that people can use the standard eselect
interface to manage gcc profiles.
URL: https://bugs.gentoo.org/507870
Reported-by: Ulrich Müller <ulm@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'gcc.eselect')
-rw-r--r-- | gcc.eselect | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gcc.eselect b/gcc.eselect new file mode 100644 index 0000000..02606dc --- /dev/null +++ b/gcc.eselect @@ -0,0 +1,45 @@ +# -*-eselect-*- vim: ft=eselect +# Copyright 2005-2015 Gentoo Foundation +# Distributed under the terms of the GNU GPL version 2 or later + +DESCRIPTION="Manage installed versions of sys-devel/gcc" +MAINTAINER="toolchain@gentoo.org" + +### list action + +describe_list() { + echo "List all installed version of gcc" +} + +do_list() { + gcc-config -l +} + +### set action + +describe_set() { + echo "Activate one of the installed gcc" +} + +describe_set_parameters() { + echo "<target>" +} + +describe_set_options() { + echo "target : Target name or number (from 'list' action)" +} + +do_set() { + [[ $# -eq 1 ]] || die -q "Please specify exactly one version to activate!" + gcc-config "$1" +} + +### show action + +describe_show() { + echo "Print the currently active gcc version" +} + +do_show() { + gcc-config -c +} |