add searchPathContents
And rename related functions for consistency.
This commit is contained in:
parent
aec2cf0abe
commit
1b63132ca3
18 changed files with 60 additions and 49 deletions
|
@ -34,7 +34,7 @@ awsConfigurator = page "Add an Amazon repository" (Just Configuration)
|
|||
|
||||
glacierConfigurator :: Widget -> Handler Html
|
||||
glacierConfigurator a = do
|
||||
ifM (liftIO $ inPath "glacier")
|
||||
ifM (liftIO $ inSearchPath "glacier")
|
||||
( awsConfigurator a
|
||||
, awsConfigurator needglaciercli
|
||||
)
|
||||
|
|
|
@ -164,7 +164,7 @@ getFirstRepositoryR :: Handler Html
|
|||
getFirstRepositoryR = postFirstRepositoryR
|
||||
postFirstRepositoryR :: Handler Html
|
||||
postFirstRepositoryR = page "Getting started" (Just Configuration) $ do
|
||||
unlessM (liftIO $ inPath "git") $
|
||||
unlessM (liftIO $ inSearchPath "git") $
|
||||
giveup "You need to install git in order to use git-annex!"
|
||||
androidspecial <- liftIO osAndroid
|
||||
path <- liftIO . defaultRepositoryPath =<< liftH inFirstRun
|
||||
|
|
|
@ -134,7 +134,7 @@ openFileBrowser = do
|
|||
let p = proc cmd [path]
|
||||
#endif
|
||||
#endif
|
||||
ifM (liftIO $ inPath cmd)
|
||||
ifM (liftIO $ inSearchPath cmd)
|
||||
( do
|
||||
let run = void $ liftIO $ forkIO $ do
|
||||
withCreateProcess p $ \_ _ _ pid -> void $
|
||||
|
|
|
@ -41,7 +41,7 @@ genKeyModal :: Widget
|
|||
genKeyModal = $(widgetFile "configurators/genkeymodal")
|
||||
|
||||
isGcryptInstalled :: IO Bool
|
||||
isGcryptInstalled = inPath "git-remote-gcrypt"
|
||||
isGcryptInstalled = inSearchPath "git-remote-gcrypt"
|
||||
|
||||
whenGcryptInstalled :: Handler Html -> Handler Html
|
||||
whenGcryptInstalled a = ifM (liftIO isGcryptInstalled)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue