- local rev2=$2
- if [[ -z ${rev2} ]] ; then
- rev2=$(
- cd ${dir}
- export IFS=/
- set -- $(grep /${file}/ CVS/Entries)
- unset IFS
- echo $3
- )
- if [[ ${rev2} == "0" ]] ; then
- # new file
- rev2="1.1"
- else
- # existing file, bump rev automatically
- rev2="1.$((${rev2#1.}+1))"
- fi
- fi
- local rev2r=${rev2#1.}
- local rev1=${3:-1.$((rev2r - 1))}
-
- local cvsroot=$(<${dir}/CVS/Repository)
- if [[ ${cvsroot} == gentoo-x86* ]] ; then
- cvsroot=${cvsroot#gentoo-x86}
- cvsroot=${cvsroot#/}
- fi
-
- local urirev
- [[ ${rev2} == "1.1" || ${rev1} == "${rev2}" ]] \
- && urirev="?rev=${rev2}" \
- || urirev="?r1=${rev1}&r2=${rev2}"
- echo "http://sources.gentoo.org/${cvsroot}/${file}${urirev}"
-}
- local f
- for f in "$@" ; do
- _cvs_gentoo_url "${f}"
- done
- unset _cvs_gentoo_url
-}
-
-
-er() {