improve upgrade paths for OSX
This commit is contained in:
parent
87c75417ac
commit
38a1259813
1 changed files with 6 additions and 5 deletions
|
@ -162,7 +162,9 @@ upgradeToDistribution newdir cleanup distributionfile = do
|
||||||
]
|
]
|
||||||
void $ boolSystem "cp"
|
void $ boolSystem "cp"
|
||||||
[ Param "-R"
|
[ Param "-R"
|
||||||
, File $ tmpdir </> installBase
|
-- Trailing slash to copy the directory
|
||||||
|
-- contents.
|
||||||
|
, File $ tmpdir </> installBase ++ "/"
|
||||||
, File $ newdir
|
, File $ newdir
|
||||||
]
|
]
|
||||||
sanitycheck newdir
|
sanitycheck newdir
|
||||||
|
@ -222,10 +224,9 @@ oldVersionLocation = do
|
||||||
pdir <- parentDir <$> readProgramFile
|
pdir <- parentDir <$> readProgramFile
|
||||||
let dirs = splitDirectories pdir
|
let dirs = splitDirectories pdir
|
||||||
{- It will probably be deep inside a git-annex.app directory. -}
|
{- It will probably be deep inside a git-annex.app directory. -}
|
||||||
let p = takeWhile (/= "git-annex.app") dirs
|
let olddir = case findIndex ("git-annex.app" `isPrefixOf`) dirs of
|
||||||
let olddir = if p == dirs
|
Nothing -> pdir
|
||||||
then pdir
|
Just i -> joinPath (take (i + 1) dirs)
|
||||||
else joinPath (p ++ ["git-annex.app"])
|
|
||||||
#else
|
#else
|
||||||
olddir <- parentDir <$> readProgramFile
|
olddir <- parentDir <$> readProgramFile
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue