Makefile: Added install-home target which installs git-annex into the HOME directory

This commit is contained in:
Joey Hess 2019-03-18 12:33:56 -04:00
parent 95e94b9d00
commit 6491b62614
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 83 additions and 17 deletions

View file

@ -29,12 +29,12 @@ import Prelude
systemwideInstall :: IO Bool
#ifndef mingw32_HOST_OS
systemwideInstall = isroot <||> destdirset
systemwideInstall = isroot <||> (not <$> userdirset)
where
isroot = do
uid <- fromIntegral <$> getRealUserID
return $ uid == (0 :: Int)
destdirset = isJust <$> catchMaybeIO (getEnv "DESTDIR")
userdirset = isJust <$> catchMaybeIO (getEnv "USERDIR")
#else
systemwideInstall = return False
#endif