Jacob Nordfalk <[email protected]>
writes:

> 2015-05-19 9:39 GMT+02:00 Kevin Brubeck Unhammer
> <[email protected]>:
>     
>     How about "locate/mdfind"?
>     
>
> It is (only) updated daily, so stuff the user just downloaded from SVN
> wont be listed.
> .... but definitely a possibility !

$ find ~ -maxdepth 3 -type d -name 'apertium-*-*' -print0 | xargs -0 -I{} ls 
'{}/modes.xml' 2>/dev/null

is one not-too-slow heuristic (finding directories first makes it a bit
faster) that at least finds some of my local pairs :)

Or you could start a full find in a different thread on the First Run.

Or you could have a First Run dialog that says "Scanning for local
language pairs … [Click here to cancel scan]".

>     $ time locate -eLb '\modes.xml' >/dev/null
>     
>     real 0m0.247s
>     user 0m0.246s
>     sys 0m0.000s
>     
>     I tend to think of the existence of a modes.xml as a fairly sure
>     sign
>     that this is an apertium data directory.
>     
>     
>
> Yes, and installed pairs arent listed ! Great.

Well, you can also grep for $HOME.

-- 
Kevin Brubeck Unhammer

GPG: 0x766AC60C

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to