crc: Fix extraction

* crc changed their file structure, need to modify accordingly
* escape char `\" is not needed anymore
* related: https://github.com/ScoopInstaller/Extras/issues/9026
* related: https://github.com/ScoopInstaller/Scoop/pull/5065
This commit is contained in:
Issac Lin 2022-08-11 15:24:39 +08:00 committed by GitHub
parent 7a4ca69cbc
commit bef9c55b2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,12 +11,8 @@
"hash": "da2153166ea6996eb3850aa196837df4e68bb1f841d37ca5ad5773400c1152bf", "hash": "da2153166ea6996eb3850aa196837df4e68bb1f841d37ca5ad5773400c1152bf",
"pre_install": [ "pre_install": [
"# The trailing backslash(\\) in $dir\\ is required by lessmsi.", "# The trailing backslash(\\) in $dir\\ is required by lessmsi.",
"# '>nul', '2>&1' sets cmd stdout to $null, and stderr to stdout",
"Invoke-ExternalCommand lessmsi -ArgumentList @('x', \"$dir\\crc-windows-amd64.msi\", \"$dir\\\") | Out-Null", "Invoke-ExternalCommand lessmsi -ArgumentList @('x', \"$dir\\crc-windows-amd64.msi\", \"$dir\\\") | Out-Null",
"$tail = $version.Split('-')[1]", "Copy-Item \"$dir\\SourceDir\\Red Hat OpenShift Local\\*\" \"$dir\" -Force -Recurse | Out-Null",
"Invoke-ExternalCommand cmd -ArgumentList @('/c', 'copy', '/b', \"`\"$dir\\SourceDir\\CodeReady Containers\\crc_hyperv_$tail.crcbundle.*`\"\", \"`\"$dir\\crc_hyperv_$tail.crcbundle`\"\", '>nul', '2>&1') | Out-Null",
"Remove-Item \"$dir\\SourceDir\\CodeReady Containers\\crc_hyperv_$tail.crcbundle.*\", \"$dir\\*.cab\", \"$dir\\*.msi\" | Out-Null",
"Copy-Item \"$dir\\SourceDir\\CodeReady Containers\\*\" \"$dir\" -Force -Recurse | Out-Null",
"Remove-Item \"$dir\\SourceDir\" -Force -Recurse | Out-Null" "Remove-Item \"$dir\\SourceDir\" -Force -Recurse | Out-Null"
] ]
} }