Created
May 30, 2018 07:10
-
-
Save hikarin522/f9b6f477e03fff8c68644f24d40e2b9e to your computer and use it in GitHub Desktop.
LFS管理されてないUnityのバイナリ形式ファイルを検索する ref: https://qiita.com/hikarin522/items/21024e5c97cded54a85b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ .\Get-UnityNonLFS.ps1 '*.asset' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param([String] $file) | |
$lfs = git lfs ls-files | |
Get-ChildItem -Recurse -Filter $file | | |
?{ ![regex]::IsMatch((Get-Content -Encoding Ascii -TotalCount 1 -ReadCount 1 $_.Target), '^%YAML') } | | |
%{ Resolve-Path -Relative $_.FullName } | | |
%{ $_ -replace '^\.\\', '' -replace '\\', '/' } | | |
?{ ($lfs -match $_).Count -eq 0 } | | |
?{ (git status --ignored -s -- $_).Count -eq 0 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment