path: root/scripts
diff options
authorYann E. MORIN" <>2011-08-14 15:51:38 (GMT)
committerYann E. MORIN" <>2011-08-14 15:51:38 (GMT)
commit09e5711dcb480363e2ffb96498c36ac53482e65c (patch)
tree37fcd082080dac94628a3606b0f5a858488dcd08 /scripts
parent3910899c77d607e5ef99b62594ffb0cc95b3c2b9 (diff)
scripts/functions: add xz support
Add support for the new XZ-compressed tarballs. At least glibc uses that new format. Signed-off-by: "Yann E. MORIN" <>
Diffstat (limited to 'scripts')
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/functions b/scripts/functions
index c9f5170..bb24264 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -400,6 +400,9 @@ CT_SetLibPath() {
# Build up the list of allowed tarball extensions
# Add them in the prefered order; most preferred comes first
CT_DoListTarballExt() {
+ if [ "${CT_CONFIGURE_has_xzutils}" = "y" ]; then
+ printf ".tar.xz\n"
+ fi
printf ".tar.bz2\n"
printf ".tar.gz\n.tgz\n"
printf ".tar\n"
@@ -753,6 +756,7 @@ CT_Extract() {
tar_opts+=( "-C" "${basename}" )
tar_opts+=( "-xv" )
case "${ext}" in
+ .tar.xz) CT_DoExecLog FILE tar "${tar_opts[@]}" --use-compress-program=xz -f "${full_file}";;
.tar.bz2) CT_DoExecLog FILE tar "${tar_opts[@]}" -j -f "${full_file}";;
.tar.gz|.tgz) CT_DoExecLog FILE tar "${tar_opts[@]}" -z -f "${full_file}";;
.tar) CT_DoExecLog FILE tar "${tar_opts[@]}" -f "${full_file}";;