diff -r 11460fc587e6 -r c08132a93049 scripts/functions --- a/scripts/functions Wed Oct 21 22:51:39 2009 +0200 +++ b/scripts/functions Mon Oct 26 19:49:50 2009 +0100 @@ -477,7 +477,8 @@ # 'tag' is the tag to retrieve. Must be specified, but can be empty. # If dirname is specified, then module will be renamed to dirname # prior to building the tarball. -# Usage: CT_GetCVS [dirname] +# Usage: CT_GetCVS [dirname[=subdir]] +# Note: if '=subdir' is given, then it is used instead of 'module'. CT_GetCVS() { local basename="$1" local uri="$2" @@ -499,8 +500,18 @@ CT_Pushd "${tmp_dir}" CT_DoExecLog ALL cvs -z 9 -d "${uri}" co -P ${tag} "${module}" - [ -n "${dirname}" ] && CT_DoExecLog ALL mv "${module}" "${dirname}" - CT_DoExecLog ALL tar cjf "${CT_TARBALLS_DIR}/${basename}.tar.bz2" "${dirname:-${module}}" + if [ -n "${dirname}" ]; then + case "${dirname}" in + *=*) + CT_DoExecLog DEBUG mv "${dirname%%=*}" "${dirname#*=}" + CT_DoExecLog ALL tar cjf "${CT_TARBALLS_DIR}/${basename}.tar.bz2" "${dirname#*=}" + ;; + *) + CT_DoExecLog ALL mv "${module}" "${dirname}" + CT_DoExecLog ALL tar cjf "${CT_TARBALLS_DIR}/${basename}.tar.bz2" "${dirname:-${module}}" + ;; + esac + fi CT_SaveLocal "${CT_TARBALLS_DIR}/${basename}.tar.bz2" CT_Popd