mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2025-12-12 02:56:03 +00:00
14 lines
299 B
PowerShell
14 lines
299 B
PowerShell
function 7zip_installed {
|
|
try { gcm 7z -ea 0 } catch { return $false }
|
|
$true
|
|
}
|
|
|
|
function requires_7zip($fname) {
|
|
$fname -match '(\.gz)|(\.tar)|(\.lzma)$'
|
|
}
|
|
|
|
function extract_7zip($path) {
|
|
$dir = split-path $path
|
|
& 7z x "$path" -o"$dir"
|
|
write-host "exit code: $lastexitcode"
|
|
} |