Files
Scoop/lib/decompress.ps1
2013-07-17 16:24:34 +10:00

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"
}