public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in app-admin/eselect-opencascade/files: eselect-opencascade-0.eselect
@ 2013-04-26 20:47 Michael Weber (xmw)
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Weber (xmw) @ 2013-04-26 20:47 UTC (permalink / raw
  To: gentoo-commits

xmw         13/04/26 20:47:03

  Added:                eselect-opencascade-0.eselect
  Log:
  Initial import
  
  (Portage version: 2.2.0_alpha173/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)

Revision  Changes    Path
1.1                  app-admin/eselect-opencascade/files/eselect-opencascade-0.eselect

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/eselect-opencascade/files/eselect-opencascade-0.eselect?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/eselect-opencascade/files/eselect-opencascade-0.eselect?rev=1.1&content-type=text/plain

Index: eselect-opencascade-0.eselect
===================================================================
# -*-eselect-*-  vim: ft=eselect
# Copyright (c) 2006-2013 Gentoo Foundation
#
# This file is part of the 'eselect' tools framework.
#
# eselect is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 2 of the License, or (at your option) any later
# version.
#
# eselect is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# eselect.  If not, see <http://www.gnu.org/licenses/>.

MODULE=opencascade
TARGET=${EROOT}/etc/env.d/50${MODULE}
CONFDIR=${EROOT}/etc/env.d/${MODULE}

inherit tests path-manipulation

find_implems() {
	local -a implems
	for file in "${CONFDIR}"/* ; do
		[[ -f ${file} ]] || continue
		implems=(${implems[@]} "${file##*/}")
	done
	echo ${implems[@]}
}

is_active() {
	local f
	[[ $# -eq 1 ]] || die "Need exactly 1 arguments!"
	[[ -L ${TARGET} ]] || return 1
	f=$(canonicalise ${TARGET})
	[[ -e ${f} ]] || return 1
	[[ ${f##*/} == ${1} ]]
}

# switch_implem $implem
# switches $iface combination to $implem
switch_implem() {
	[[ $# -eq 1 ]] || die "Need exactly 1 arguments!"
	$(is_active ${1}) && return
	[[ -L ${TARGET} ]] && rm -f ${TARGET}
	ln -s ${MODULE}/${1} ${TARGET}
	env-update
	echo "If you intend to use the selected opencascade in"
	echo "an already running shell, please remember to do:"
	echo
	echo ". /etc/profile"
}

do_list() {
	local implem i
	write_list_start "Installed $MODULE"
	for implem in $(find_implems) ; do
		(( i++ ))
		is_active ${implem##*/} \
			&& implem=$(highlight_marker "${implem}")
		write_numbered_list_entry $i "${implem}"
	done
}

describe_set() {
	echo "Activate one of the installed $MODULE implementations"
}

describe_set_parameters() {
	echo "<implementation>"
}

describe_set_options() {
	echo "implementation : implementation name or number (from 'list' action)"
}

do_set() {
	[[ $# -ne 1 ]] && die -q "Please specify exactly 1 implementation!"
	local -a implems

	implems=( $(find_implems) )
	
	if is_number ${1} ; then
		new_implem=${implems[$(( ${1} - 1 ))]}
	else
		new_implem=${1}
	fi
	echo $new_implem
	switch_implem ${new_implem}
}

describe_show() {
	echo "Print the currently active $MODULE implementation"
}

do_show() {
	local f n
	[[ -L ${TARGET} ]] || return 1
	f=$(canonicalise ${TARGET})
	[[ -f ${f} ]] || return 1
	echo ${f##*/}
}





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-admin/eselect-opencascade/files: eselect-opencascade-0.eselect
@ 2013-04-26 22:45 Michael Weber (xmw)
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Weber (xmw) @ 2013-04-26 22:45 UTC (permalink / raw
  To: gentoo-commits

xmw         13/04/26 22:45:26

  Modified:             eselect-opencascade-0.eselect
  Log:
  Add keywords, rename TARGET to 51opencascade
  
  (Portage version: 2.2.0_alpha173/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)

Revision  Changes    Path
1.2                  app-admin/eselect-opencascade/files/eselect-opencascade-0.eselect

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/eselect-opencascade/files/eselect-opencascade-0.eselect?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/eselect-opencascade/files/eselect-opencascade-0.eselect?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/eselect-opencascade/files/eselect-opencascade-0.eselect?r1=1.1&r2=1.2

Index: eselect-opencascade-0.eselect
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-admin/eselect-opencascade/files/eselect-opencascade-0.eselect,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- eselect-opencascade-0.eselect	26 Apr 2013 20:47:03 -0000	1.1
+++ eselect-opencascade-0.eselect	26 Apr 2013 22:45:26 -0000	1.2
@@ -16,7 +16,7 @@
 # eselect.  If not, see <http://www.gnu.org/licenses/>.
 
 MODULE=opencascade
-TARGET=${EROOT}/etc/env.d/50${MODULE}
+TARGET=${EROOT}/etc/env.d/51${MODULE}
 CONFDIR=${EROOT}/etc/env.d/${MODULE}
 
 inherit tests path-manipulation





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-admin/eselect-opencascade/files: eselect-opencascade-0.eselect
@ 2015-03-31 20:35 Ulrich Mueller (ulm)
  0 siblings, 0 replies; 3+ messages in thread
From: Ulrich Mueller (ulm) @ 2015-03-31 20:35 UTC (permalink / raw
  To: gentoo-commits

ulm         15/03/31 20:35:48

  Removed:              eselect-opencascade-0.eselect
  Log:
  Package move app-admin/eselect-* to app-eselect/eselect-*.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-31 20:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-31 20:35 [gentoo-commits] gentoo-x86 commit in app-admin/eselect-opencascade/files: eselect-opencascade-0.eselect Ulrich Mueller (ulm)
  -- strict thread matches above, loose matches on Subject: below --
2013-04-26 22:45 Michael Weber (xmw)
2013-04-26 20:47 Michael Weber (xmw)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox