mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
no neet to check GF_LIB_PATH. GF will do it anyway
This commit is contained in:
6
Setup.hs
6
Setup.hs
@@ -9,7 +9,7 @@ import System.IO.Error (catchIOError)
|
||||
import System.Exit (ExitCode(..),exitFailure)
|
||||
import System.Environment (getArgs,lookupEnv)
|
||||
import System.Process (rawSystem,readProcess)
|
||||
import System.FilePath ((</>),splitSearchPath) -- ,takeFileName,addExtension,dropExtension)
|
||||
import System.FilePath ((</>))
|
||||
import System.Directory (createDirectoryIfMissing,copyFile,getDirectoryContents,removeDirectoryRecursive,findFile)
|
||||
#if __GLASGOW_HASKELL__>=800
|
||||
import System.Directory (getModificationTime,setModificationTime)
|
||||
@@ -60,7 +60,6 @@ errLocation :: String
|
||||
errLocation = unlines $
|
||||
[ "Unable to determine where to install the RGL. Please do one of the following:"
|
||||
, " - Pass the " ++ destination_flag ++ "... flag to this script"
|
||||
, " - Set the GF_LIB_PATH environment variable"
|
||||
, " - Compile & install GF from the gf-core repository"
|
||||
]
|
||||
|
||||
@@ -119,11 +118,10 @@ mkInfo = do
|
||||
let gf = maybe default_gf id (getFlag gf_flag args)
|
||||
-- Look for install location in a few different places
|
||||
let mflag = getFlag destination_flag args
|
||||
menvar <- lookupEnv "GF_LIB_PATH" >>= return . fmap (head . splitSearchPath)
|
||||
mbuilt <- catchIOError (readProcess gf ["--version"] "" >>= return . getPath) (\e -> return Nothing)
|
||||
let
|
||||
inst_dir =
|
||||
case catMaybes [mflag,menvar,mbuilt] of
|
||||
case catMaybes [mflag,mbuilt] of
|
||||
[] -> Nothing
|
||||
p:_ -> Just p
|
||||
let verbose = verbose_switch `elem` args || verbose_switch_short `elem` args
|
||||
|
||||
Reference in New Issue
Block a user