Skip to content

Commit fce0a35

Browse files
author
Damian Rouson
committed
Fix file-extension check for conditional unpacking
1 parent bded815 commit fce0a35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

prerequisites/build-functions/unpack_if_necessary.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ unpack_if_necessary()
55
if [[ "${fetch}" == "svn" || "${fetch}" == "git" ]]; then
66
package_source_directory="${version_to_build}"
77
else
8-
if [[ ${url_tail} == "*tar.gz" || ${url_tail} == "*tar.bz2" || ${url_tail} == "*.tar.xz" ]]; then
8+
if [[ "${url_tail}" == *tar.gz || "${url_tail}" == *tar.bz2 || "${url_tail}" == *.tar.xz ]]; then
99
info "Unpacking ${url_tail}."
1010
info "pushd ${download_path}"
1111
pushd "${download_path}"
@@ -14,7 +14,7 @@ unpack_if_necessary()
1414
info "popd"
1515
popd
1616
else
17-
info "Skipping unpacking because ${url_tail} is not a compressed archive (*.gz, *.bz2, or *.xz). "
17+
info "Skipping unpacking because ${url_tail} is not a compressed archive (matching one of *.tar.{gz,bz2,xz}). "
1818
fi
1919
# shellcheck disable=SC2034
2020
package_source_directory="${package_name}-${version_to_build}"

0 commit comments

Comments
 (0)