diff options
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/eselect-yacc/Manifest | 2 | ||||
-rw-r--r-- | app-admin/eselect-yacc/eselect-yacc-0.1.ebuild | 21 | ||||
-rw-r--r-- | app-admin/eselect-yacc/files/yacc.eselect | 148 |
3 files changed, 0 insertions, 171 deletions
diff --git a/app-admin/eselect-yacc/Manifest b/app-admin/eselect-yacc/Manifest deleted file mode 100644 index 1a46e40..0000000 --- a/app-admin/eselect-yacc/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -AUX yacc.eselect 3618 RMD160 bbdc9025f64fdd1e1639fa71ed17b192bc5650e7 SHA1 dd102a862fb2f0b0a329c09df6969f0a8c87abda SHA256 e789b8e0d85485be286228068bf87b90d83dcad911f67d3a94007e38741dfee1 -EBUILD eselect-yacc-0.1.ebuild 431 RMD160 de7746b6f486803c52756223c7108440f434b4ed SHA1 ffbdeaaa59c5e021e168561a48c06722d628f910 SHA256 64dbf2912ac69a4bda4565a80cb3277074bf44d7cf08b65d771e864ea7b0f46f diff --git a/app-admin/eselect-yacc/eselect-yacc-0.1.ebuild b/app-admin/eselect-yacc/eselect-yacc-0.1.ebuild deleted file mode 100644 index 245e083..0000000 --- a/app-admin/eselect-yacc/eselect-yacc-0.1.ebuild +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -DESCRIPTION="A eselect module to handle yacc symlink" -HOMEPAGE="www.gentoo.org" -#SRC_URI="mirrors://gentoo/..." -SRC_URI="" - -LICENSE="" -SLOT="0" -KEYWORDS="~x86 ~amd64" -IUSE="" - -DEPEND="" -RDEPEND="app-admin/eselect" - -src_install() { - insinto /usr/share/eselect/modules - doins "${FILESDIR}"/yacc.eselect || die -} diff --git a/app-admin/eselect-yacc/files/yacc.eselect b/app-admin/eselect-yacc/files/yacc.eselect deleted file mode 100644 index 967be72..0000000 --- a/app-admin/eselect-yacc/files/yacc.eselect +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit output path-manipulation - -DESCRIPTION="Manage /usr/bin/yacc symlink" -MAINTAINER="base-system@gentoo.org" -VERSION="0.1" -YACC_SYMLINK=${ROOT}/usr/bin/yacc - -# find_targets -# returns available targets for symlink -# Note: first match is best match for do_update command -find_targets() { - local f - for f in "${ROOT}/usr/bin/"{yacc.bison,yacc.yacc} ; do - [[ -x $f ]] && echo "${f}" - done -} - -# is_active $target -# returns true if ${YACC_SYMLINK} points to $target -is_active() { - [[ ${#@} -eq 1 ]] || die "Need exactly 1 argument!" - [[ -L ${YACC_SYMLINK} && $(canonicalise ${YACC_SYMLINK}) -ef ${1} ]] -} - -# is_updateable -# returns true if ${YACC_SYMLINK} could be updated -# That means it does either is symlink or does not exist -is_updateable() { - [[ -L ${YACC_SYMLINK} || ! -a ${YACC_SYMLINK} ]] -} - -# safe_set_symlink $target -# does some safety checks and points $YACC_SYMLINK to $target -safe_set_symlink() { - [[ ${#@} -eq 1 ]] || die "Need exactly 1 argument!" - [[ -x ${1} ]] || die "${1} is not executable!" - is_updateable || die "${YACC_SYMLINK} exists but is not symlink!" - ln -sf "${1}" "${YACC_SYMLINK}" || \ - die "Failed to set symlink! How could this happen? :(" -} - -### list action ### - -describe_list() { - echo "List available targets for ${YACC_SYMLINK} symlink can point to" -} - -do_list() { - local targets i=0 active - - targets=( $(find_targets) ) - - write_list_start "Available possibilities for ${YACC_SYMLINK} symlink can point to:" - write_list_start "( $(highlight '*') - designates where symlink points now)" - if [[ -n ${targets[@]} ]] ; then - for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do - active='' - is_active "${targets[${i}]}" && active=' *' - write_numbered_list_entry ${i} "${targets[${i}]}$(highlight "${active}")" - done - else - write_kv_list_entry "(none found)" "" - fi - - return 0 -} - -### show action ### - -describe_show() { - echo "Show where ${YACC_SYMLINK} currently points to" -} - -do_show() { - if [[ -L ${YACC_SYMLINK} ]]; then - echo $(canonicalise "${YACC_SYMLINK}") - else - write_warning_msg "${YACC_SYMLINK} is not a symlink!" - fi -} - -### set action ### - -describe_set() { - echo "Set ${YACC_SYMLINK} symlink" -} - -describe_set_parameters() { - echo "<target>" -} - -describe_set_options() { - echo "<target> : Target name or number (from 'list' action)" -} - -do_set() { - [[ ${#@} == 1 ]] || \ - die -q "Please specify exactly one version to activate!" - - local target targets i=0 - - targets=( $(find_targets) ) - - if is_number "${1}"; then - target=${targets[${1}]} - else - for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do - [[ ${targets[${i}]} == ${1} ]] && \ - target=${1} - done - fi - - [[ -z "${target}" ]] && \ - die -q "Target \"${target}\" doesn't appear to be valid!" - - safe_set_symlink ${target} -} - -### update action ### - -describe_update() { - echo "Atomaticaly detect providers for ${YACC_SYMLINK} symlink and set it" -} - -do_update() { - local target targets i=0 - - targets=( $(find_targets) ) - if [[ -n ${targets[@]} ]] ; then - for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do - [[ ${targets[${i}]} -ef $(canonicalise "${YACC_SYMLINK}") ]] && \ - return 0 - done - safe_set_symlink ${targets[0]} - else - write_warning_msg "No targets exist to update symlink. Removing ${YACC_SYMLINK} if exist." - write_warning_msg "Ignore this warning if you removed all yacc providers." - is_updateable || \ - die -q "${YACC_SYMLINK} is not symlink. I'd better not remove it!" - [[ -L ${YACC_SYMLINK} ]] && rm -r ${YACC_SYMLINK} - fi -} - -# vim: set ft=eselect : |