alien.libraries.finder: Add find-library-from-list utility word.
parent
a8b78071ff
commit
77f806d6c5
|
@ -1,5 +1,5 @@
|
||||||
|
USING: combinators kernel sequences system vocabs
|
||||||
USING: combinators kernel system vocabs alien.libraries ;
|
alien.libraries ;
|
||||||
IN: alien.libraries.finder
|
IN: alien.libraries.finder
|
||||||
|
|
||||||
HOOK: find-library* os ( name -- path/f )
|
HOOK: find-library* os ( name -- path/f )
|
||||||
|
@ -7,6 +7,9 @@ HOOK: find-library* os ( name -- path/f )
|
||||||
: find-library ( name -- path/library-not-found )
|
: find-library ( name -- path/library-not-found )
|
||||||
dup find-library* [ nip ] when* ;
|
dup find-library* [ nip ] when* ;
|
||||||
|
|
||||||
|
: find-library-from-list ( seq -- path/f )
|
||||||
|
[ find-library* ] map [ ] find nip ;
|
||||||
|
|
||||||
{
|
{
|
||||||
{ [ os macosx? ] [ "alien.libraries.finder.macosx" ] }
|
{ [ os macosx? ] [ "alien.libraries.finder.macosx" ] }
|
||||||
{ [ os linux? ] [ "alien.libraries.finder.linux" ] }
|
{ [ os linux? ] [ "alien.libraries.finder.linux" ] }
|
||||||
|
|
Loading…
Reference in New Issue