got hdevtools working on the git-annex source tree

This commit is contained in:
Joey Hess 2013-03-12 05:48:41 -04:00
parent 3e0370017f
commit ccb7e5cfa4
5 changed files with 40 additions and 12 deletions

View file

@ -21,7 +21,9 @@ import qualified Git.Command
import qualified Annex
import Locations.UserConfig
import Utility.FreeDesktop
#ifdef WITH_CLIBS
import Utility.Mounts
#endif
import Utility.DiskFree
import Utility.DataUnits
import Utility.Network
@ -236,6 +238,7 @@ getEnableDirectoryR uuid = page "Enable a repository" (Just Configuration) $ do
{- List of removable drives. -}
driveList :: IO [RemovableDrive]
#ifdef WITH_CLIBS
driveList = mapM (gen . mnt_dir) =<< filter sane <$> getMounts
where
gen dir = RemovableDrive
@ -254,6 +257,9 @@ driveList = mapM (gen . mnt_dir) =<< filter sane <$> getMounts
| dir == "/run/shm" = False
| dir == "/run/lock" = False
| otherwise = True
#else
driveList = return []
#endif
{- Bootstraps from first run mode to a fully running assistant in a
- repository, by running the postFirstRun callback, which returns the