diff options
author | Alexey Neyman <stilor@att.net> | 2019-02-28 14:39:08 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2019-02-28 17:13:12 -0800 |
commit | 9b9e5c4162e39b63da4783124e844adf2f223f26 (patch) | |
tree | 3649279a9eb5f4938ad08f8841c65a58e9ed8166 /scripts/functions | |
parent | 857b7928b883e82971eba1dd02288b95c12b61ce (diff) | |
download | crosstool-ng-9b9e5c4162e39b63da4783124e844adf2f223f26.tar.gz crosstool-ng-9b9e5c4162e39b63da4783124e844adf2f223f26.tar.bz2 crosstool-ng-9b9e5c4162e39b63da4783124e844adf2f223f26.zip |
Make lzip an optional dependency
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/functions b/scripts/functions index fecdad2e..09df03af 100644 --- a/scripts/functions +++ b/scripts/functions @@ -669,7 +669,9 @@ CT_DoListTarballExt() { printf ".tar.xz\n" printf ".tar.lzma\n" - printf ".tar.lz\n" + if [ "${CT_CONFIGURE_has_lzip}" = "y" ]; then + printf ".tar.lz\n" + fi printf ".tar.bz2\n" printf ".tar.gz\n.tgz\n" printf ".tar\n" @@ -2074,6 +2076,7 @@ CT_PackageRun() CT_DoFetch() { local tmp_dir + local extensions e a if [ "${src_release}" = "y" ]; then # Some packages do not contain any directory level at all @@ -2083,8 +2086,17 @@ CT_DoFetch() basename="${pkg_name}-${version}" fi pkg_dir="${pkg_name}/${version}" + # Check which extensions we are allowed to fetch + for a in ${archive_formats}; do + for e in $(CT_DoListTarballExt); do + if [ "${a}" = "${e}" ]; then + extensions="${extensions} ${a}" + break + fi + done + done if ! CT_GetFile package="${pkg_name}" pkg_dir="${pkg_dir}" dir_name="${dir_name}" \ - basename="${archive_filename}" extensions="${archive_formats}" \ + basename="${archive_filename}" extensions="${extensions}" \ digest="${CT_VERIFY_DOWNLOAD_DIGEST}" \ signature_format="${CT_VERIFY_DOWNLOAD_SIGNATURE:+${signature_format}}" \ mirrors="${mirrors}"; then |