/[gentoo-x86]/eclass/alternatives.eclass
Gentoo

Diff of /eclass/alternatives.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 Revision 1.3
1# Copyright 1999-2003 Gentoo Technologies, Inc. 1# Copyright 1999-2003 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/alternatives.eclass,v 1.2 2003/10/07 20:26:50 liquidx Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/alternatives.eclass,v 1.3 2003/10/07 20:28:52 liquidx Exp $
4 4
5# Author : Alastair Tse <liquidx@gentoo.org> (03 Oct 2003) 5# Author : Alastair Tse <liquidx@gentoo.org> (03 Oct 2003)
6# Short Desc: Creates symlink to the latest version of multiple slotted 6# Short Desc: Creates symlink to the latest version of multiple slotted
7# packages. 7# packages.
8# 8#
51 local unsorted 51 local unsorted
52 SOURCE=$1 52 SOURCE=$1
53 REGEX=$2 53 REGEX=$2
54 54
55 ALT="`ls -1 --color=never ${ROOT}${REGEX} | sed -e "s:^${ROOT}::" | sort -r | xargs`" 55 ALT="`ls -1 --color=never ${ROOT}${REGEX} | sed -e "s:^${ROOT}::" | sort -r | xargs`"
56 einfo "alternatives: $ROOT $REGEX $ALT"
57 if [ -n "${ALT}" ]; then 56 if [ -n "${ALT}" ]; then
58 alternatives_makesym ${SOURCE} ${ALT} 57 alternatives_makesym ${SOURCE} ${ALT}
59 else 58 else
60 eerror "regex ${REGEX} doesn't match any files." 59 eerror "regex ${REGEX} doesn't match any files."
61 fi 60 fi

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20