Delete all except git.exe, reducing final size

Using git-$COMMAND is no longer supported anyway.
This commit is contained in:
Martin Kemp 2015-03-18 14:55:44 +00:00
parent 8b8f98c078
commit 004761b32f

View File

@ -63,10 +63,5 @@ function Digest-MD5 ($path) {
function Cleanup-Git () {
$gitdir = '/vendor/msysgit/libexec/git-core/'
Get-Childitem $gitdir -Filter git-* | Where { $_ -NotMatch '--' } | Foreach-Object {
'@' + $_.BaseName.Split("-") -join ' ' + ' $*' | Set-Content -Path $_.BaseName'.bat'
Remove-Item $_.FullName
}
# Cleanup any missed files
Get-Childitem $gitdir -Exclude git.exe,*.bat | Where-Object{!($_.PSIsContainer)} | Foreach-Object { Remove-Item $_.FullName }
Get-Childitem $gitdir -Exclude git.exe | Where-Object{!($_.PSIsContainer)} | Foreach-Object { Remove-Item $_.FullName }
}