diff --git a/images/macos/scripts/build/install-unxip.sh b/images/macos/scripts/build/install-unxip.sh new file mode 100644 index 000000000..fe7e3e1dd --- /dev/null +++ b/images/macos/scripts/build/install-unxip.sh @@ -0,0 +1,15 @@ +#!/bin/bash -e -o pipefail +################################################################################ +## File: install-unxip.sh +## Desc: Install unxip +################################################################################ + +source ~/utils/utils.sh + +echo "Installing unxip..." +unxip_pkg=$(download_with_retry "https://github.com/saagarjha/unxip/releases/download/v3.1/unxip") +unxip_pkg_sha256="926ecd7bffa201c7b2b8a729fc70fbf228cf624a0e6856c13f935a97fa4fc71a" +use_checksum_comparison $unxip_pkg $unxip_pkg_sha256 +install "$unxip_pkg" /usr/local/bin/unxip + +invoke_tests "Common" "Unxip" diff --git a/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 b/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 index a7a8d6bd0..7e90c4d5c 100644 --- a/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 +++ b/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 @@ -149,6 +149,7 @@ if ($os.IsMonterey) { $utilities.AddToolVersion("Vagrant", $(Get-VagrantVersion)) $utilities.AddToolVersion("VirtualBox", $(Get-VirtualBoxVersion)) } +$utilities.AddToolVersion("Unxip", $(Get-UnxipVersion)) $utilities.AddToolVersion("yq", $(Get-YqVersion)) $utilities.AddToolVersion("zstd", $(Get-ZstdVersion)) diff --git a/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 b/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 index e58fd1a52..158c38b99 100644 --- a/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 +++ b/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 @@ -619,3 +619,8 @@ function Get-XcodesVersion { $XcodesVersion = Run-Command "xcodes version" return $XcodesVersion } + +function Get-UnxipVersion { + $unxipVersion = Run-Command "unxip --version" | Take-Part -Part 1 + return $unxipVersion +} diff --git a/images/macos/scripts/tests/Common.Tests.ps1 b/images/macos/scripts/tests/Common.Tests.ps1 index 497ed60e2..4d6ebf8e2 100644 --- a/images/macos/scripts/tests/Common.Tests.ps1 +++ b/images/macos/scripts/tests/Common.Tests.ps1 @@ -162,3 +162,9 @@ Describe "Compiled" -Skip:(-not $os.IsMonterey) { "sbt -version" | Should -ReturnZeroExitCode } } + +Describe "Unxip" { + It "Unxip" { + "unxip --version" | Should -ReturnZeroExitCode + } +} diff --git a/images/macos/templates/macOS-13.anka.pkr.hcl b/images/macos/templates/macOS-13.anka.pkr.hcl index 352b1d896..25789a533 100644 --- a/images/macos/templates/macOS-13.anka.pkr.hcl +++ b/images/macos/templates/macOS-13.anka.pkr.hcl @@ -217,7 +217,8 @@ build { "${path.root}/../scripts/build/install-rubygems.sh", "${path.root}/../scripts/build/install-git.sh", "${path.root}/../scripts/build/install-node.sh", - "${path.root}/../scripts/build/install-common-utils.sh" + "${path.root}/../scripts/build/install-common-utils.sh", + "${path.root}/../scripts/build/install-unxip.sh" ] } diff --git a/images/macos/templates/macOS-13.arm64.anka.pkr.hcl b/images/macos/templates/macOS-13.arm64.anka.pkr.hcl index 238ab132e..7e03aa8fe 100644 --- a/images/macos/templates/macOS-13.arm64.anka.pkr.hcl +++ b/images/macos/templates/macOS-13.arm64.anka.pkr.hcl @@ -219,7 +219,8 @@ build { "${path.root}/../scripts/build/install-rubygems.sh", "${path.root}/../scripts/build/install-git.sh", "${path.root}/../scripts/build/install-node.sh", - "${path.root}/../scripts/build/install-common-utils.sh" + "${path.root}/../scripts/build/install-common-utils.sh", + "${path.root}/../scripts/build/install-unxip.sh" ] } diff --git a/images/macos/toolsets/toolset-13.json b/images/macos/toolsets/toolset-13.json index 6fa79c72a..1518b52f0 100644 --- a/images/macos/toolsets/toolset-13.json +++ b/images/macos/toolsets/toolset-13.json @@ -78,7 +78,6 @@ "zstd", "gmp", "yq", - "unxip", "xcbeautify", "xcodes" ],