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

Diff of /eclass/versionator.eclass

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

Revision 1.3 Revision 1.4
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
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/versionator.eclass,v 1.3 2005/01/01 22:58:14 ciaranm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/versionator.eclass,v 1.4 2005/01/02 17:08:19 ciaranm Exp $
4# 4#
5# Original Author: Ciaran McCreesh <ciaranm@gentoo.org> 5# Original Author: Ciaran McCreesh <ciaranm@gentoo.org>
6# 6#
7# This eclass provides functions which simplify manipulating $PV and similar 7# This eclass provides functions which simplify manipulating $PV and similar
8# variables. Most functions default to working with $PV, although other 8# variables. Most functions default to working with $PV, although other
198 c=( $(get_all_version_components "${2:-${PV}}" ) ) 198 c=( $(get_all_version_components "${2:-${PV}}" ) )
199 c="${c[@]//[-._]/$1}" 199 c="${c[@]//[-._]/$1}"
200 echo ${c// } 200 echo ${c// }
201} 201}
202 202
203# Delete the $1th separator in $3 (defaults to $PV if $3 is not supplied). If 203# Delete the $1th separator in $2 (defaults to $PV if $2 is not supplied). If
204# there are fewer than $1 separators, don't change anything. 204# there are fewer than $1 separators, don't change anything.
205# 1 1.2.3 -> 12.3 205# 1 1.2.3 -> 12.3
206# 2 1.2.3 -> 1.23 206# 2 1.2.3 -> 1.23
207# 1 1b-2.3 -> 1b2.3 207# 1 1b-2.3 -> 1b2.3
208# Rather than being a number, $1 can be a separator character such as '-', '.' 208# Rather than being a number, $1 can be a separator character such as '-', '.'

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

  ViewVC Help
Powered by ViewVC 1.1.20