Hi Alexander, *, On Thu, Aug 29, 2013 at 12:30 PM, Alexander Thurgood <alex.thurg...@gmail.com> wrote: > Hi all, > > Is it intended that for 4.1 the applescript installer now scans every > file on the whole disk looking for the strings equal to 'LibreOffice*' > and not equal to 'LibreOffice Language Pack.app' ?
No - and it doesn't do that. > > set the found_ooos_all to (do shell script "mdfind \"kMDItemContentType > == 'com.apple.application-bundle' && kMDItemDisplayName == > 'LibreOffice*' && kMDItemDisplayName != 'LibreOffice Language > Pack.app'\"") & " > " & chooseMyOwn mdfind is the commandline tool for spotlight, that should use the spotlight db only, not do a full manual scan, just as the "locate" command on linux would do. > whereas the 4.0.5 langpack contains : > > set found_ooos_all to "" > -- command might return an error if spotlight is disabled completely > try > set found_ooos_all to (do shell script "mdfind \"kMDItemContentType == > 'com.apple.application-bundle' && kMDItemDisplayName == 'LibreOffice*' > && kMDItemDisplayName != 'LibreOffice Language Pack.app'\"") > end try > set found_ooos_all to found_ooos_all & " > " & chooseMyOwn That is just an additional "try .. end try" around that call to not abort the whole installation script just because the mdfind command cannot be executed, for example when spotlight is disabled. Without that try, the script would just terminate, and not allow the user to install the langaugepack. > If I run, from the terminal : > > mdfind kMDItemContentType == 'com.apple.application-bundle' && mdfind > kMDItemDisplayName == 'LibreOffice*' && mdfind kMDItemDisplayName != > 'LibreOffice Language Pack.app' > > it takes about 30 mins to finish. Well - as the command has been the same for years, then something in your spotlight configuration did change. Maybe there is a setting to always have it do a full scan instead of using the cache. But your command also is not equivalent to the command used by the script. You run mdfind multiple times with different search strings, while the script runs mdfind once with multiple search strings. mdfind "kMDItemContentType == 'com.apple.application-bundle' && kMDItemDisplayName == 'LibreOffice*' && kMDItemDisplayName != 'LibreOffice Language Pack.app'" is what the script runs. And that should be pretty fast. ciao Christian _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice