make.sh: Explicitely call zstd to extract toolchain

Message ID 20210711131215.4142-1-michael.tremer@ipfire.org
State Accepted
Commit cec532b4cc501ee5b97c64d7f042bbcdc58283bf
Headers
Series make.sh: Explicitely call zstd to extract toolchain |

Commit Message

Michael Tremer July 11, 2021, 1:12 p.m. UTC
  Some older versions of tar do not recognise Zstandard, yet.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 make.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Peter Müller July 12, 2021, 5:28 p.m. UTC | #1
Thank you very much. :-)

Tested-by: Peter Müller <peter.mueller@ipfire.org>

> Some older versions of tar do not recognise Zstandard, yet.
> 
> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
> ---
>  make.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/make.sh b/make.sh
> index 7bdeeaf62..13a48f461 100755
> --- a/make.sh
> +++ b/make.sh
> @@ -1735,7 +1735,7 @@ build)
>  			PACKAGENAME=${PACKAGE%.tar.zst}
>  			print_build_stage "Packaged toolchain compilation"
>  			if [ `md5sum $PACKAGE | awk '{print $1}'` == `cat $PACKAGENAME.md5 | awk '{print $1}'` ]; then
> -				tar axf $PACKAGE
> +				zstd -d < "${PACKAGE}" | tar x
>  				prepareenv
>  			else
>  				exiterror "$PACKAGENAME md5 did not match, check downloaded package"
>
  

Patch

diff --git a/make.sh b/make.sh
index 7bdeeaf62..13a48f461 100755
--- a/make.sh
+++ b/make.sh
@@ -1735,7 +1735,7 @@  build)
 			PACKAGENAME=${PACKAGE%.tar.zst}
 			print_build_stage "Packaged toolchain compilation"
 			if [ `md5sum $PACKAGE | awk '{print $1}'` == `cat $PACKAGENAME.md5 | awk '{print $1}'` ]; then
-				tar axf $PACKAGE
+				zstd -d < "${PACKAGE}" | tar x
 				prepareenv
 			else
 				exiterror "$PACKAGENAME md5 did not match, check downloaded package"