Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6114
Modified Files: Tag: devel_0_39 desire.tk Log Message: attempt to fix trac#2 ("which" command doesn't exist on win32)
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.291 retrieving revision 1.1.2.292 diff -C2 -d -r1.1.2.291 -r1.1.2.292 *** desire.tk 7 Aug 2006 16:41:49 -0000 1.1.2.291 --- desire.tk 7 Aug 2006 17:01:58 -0000 1.1.2.292 *************** *** 38,41 **** --- 38,49 ---- package require objective
+ proc which {file} { + global env + foreach dir [split $env(PATH) ":"] { + if {[file exists $dir/$file]} {return $dir/$file} + } + return "" + } + #-----------------------------------------------------------------------------------# # some list processing functions and some math too *************** *** 1054,1058 ****
#set pd_prefix [file dirname [file dirname [exec which pd]]] ! #set pd_guidir ${pd_prefix}/lib/pd set pd_guidir "" set doc_number 1 --- 1062,1067 ----
#set pd_prefix [file dirname [file dirname [exec which pd]]] ! set pd_prefix [file dirname [file dirname [which pd]]] ! set pd_guidir ${pd_prefix}/lib/pd set pd_guidir "" set doc_number 1