diff options
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/scripts/functions b/scripts/functions index 62a2f99..b9aa7e7 100644 --- a/scripts/functions +++ b/scripts/functions @@ -477,7 +477,8 @@ CT_GetFile() { # '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 <basename> <url> <module> <tag> [dirname] +# Usage: CT_GetCVS <basename> <url> <module> <tag> [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_GetCVS() { 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 @@ -612,7 +623,7 @@ CT_Patch() { CT_DoLog EXTRA "Patching '${basename}'" bundled_patch_dir="${CT_LIB_DIR}/patches/${base_file}/${ver_file}" - local_patch_dir="${CT_CUSTOM_PATCH_DIR}/${base_file}/${ver_file}" + local_patch_dir="${CT_LOCAL_PATCH_DIR}/${base_file}/${ver_file}" case "${CT_PATCH_ORDER}" in bundled) patch_dirs=("${bundled_patch_dir}");; @@ -696,9 +707,9 @@ CT_DoBuildTargetTuple() { # Set defaults for the system part of the tuple. Can be overriden # by architecture-specific values. case "${CT_LIBC}" in - none) CT_TARGET_SYS=elf;; *glibc) CT_TARGET_SYS=gnu;; uClibc) CT_TARGET_SYS=uclibc;; + *) CT_TARGET_SYS=elf;; esac # Transform the ARCH into a kernel-understandable ARCH |