Changeset 8392 for src/Pugs/Embed
- Timestamp:
- 12/23/05 13:09:56 (3 years ago)
- Files:
-
- 1 modified
-
src/Pugs/Embed/Parrot.hsc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Embed/Parrot.hsc
r7852 r8392 20 20 if isJust rv then return rv else do 21 21 cwd <- getCurrentDirectory 22 rv <- findExecutableInDirectory cwd cmd 23 if isJust rv then return rv else do 24 dir <- getEnv "PARROT_PATH" 25 if isNothing dir then return Nothing else do 26 rv <- findExecutableInDirectory (fromJust dir) cmd 27 if isJust rv then return rv else do 28 return Nothing 29 30 findExecutableInDirectory dir cmd = do 22 31 ##ifdef PUGS_HAVE_POSIX 23 let parrot = cwd++ ('/':cmd)32 let file = dir ++ ('/':cmd) 24 33 ##else 25 let parrot = cwd++ ('\\':cmd) ++ ".exe"34 let file = dir ++ ('\\':cmd) ++ ".exe" 26 35 ##endif 27 ok <- doesFileExist parrot 28 return $ if ok then Just parrot else Nothing 36 print ("Exisitng", file) 37 ok <- doesFileExist file 38 return $ if ok then Just file else Nothing 29 39 30 40 findParrot :: IO FilePath
