Hello fellows,
I'm on Mac OS X and have the following problem:
Using a common cleanup script I got rid of useless localizations, keeping all the english files:
find /Applications ~/Applications /Library ~/Library \( -iname '*.lproj' -and \! \( -iname 'en*' \) -and \! \( -path '/Library/Receipts/*' -or -path '~/Library/Receipts/*' \) \) -print0 | xargs -0 rm -frv {}
Unfortunately I forgot to also filter out all german files, which would have looked like this:
find /Applications ~/Applications /Library ~/Library \( -iname '*.lproj' -and \! \( -iname 'en*' -or -iname 'de*' -or -iname 'ger*' \) -and \! \( -path '/Library/Receipts/*' -or -path '~/Library/Receipts/*' \) \) -print0 | xargs -0 rm -frv {}
Since I happen to have a full backup of my system, I would be able to restore all removed german language files to their respective locations...
How could I achieve this??
I would perform the above search for the (still existing) english files...
find /Applications ~/Applications /Library ~/Library \( -iname '*.lproj' -and \! \( -iname 'en*' \) -and \! \( -path '/Library/Receipts/*' -or -path '~/Library/Receipts/*' \) \)
... which gives me the path for every file, like "/Applications/Foo.app/Contents/Resources/English.lproj"
And then I would need to go to "/Volumes/Backup" + the above path without the filename, look for "de.lproj" and "German.lproj" and copy whatever result to the original location...
Any ideas how this second part of the script would look like? I have no clue and I really don't want to restore hundreds of files manually...
Thanks in advance!