fix sanity check on OSX

This commit is contained in:
Joey Hess 2013-11-25 14:46:33 -04:00
parent 3b2468c824
commit 85a82957ea

View file

@ -165,11 +165,11 @@ upgradeToDistribution newdir cleanup distributionfile = do
, File $ tmpdir </> installBase </> "Contents" , File $ tmpdir </> installBase </> "Contents"
, File $ newdir , File $ newdir
] ]
sanitycheck newdir
void $ boolSystem "hdiutil" void $ boolSystem "hdiutil"
[ Param "eject" [ Param "eject"
, File tmpdir , File tmpdir
] ]
sanitycheck newdir
let deleteold = do let deleteold = do
deleteFromManifest $ olddir </> "Contents" </> "MacOS" deleteFromManifest $ olddir </> "Contents" </> "MacOS"
makeorigsymlink olddir makeorigsymlink olddir
@ -197,7 +197,7 @@ upgradeToDistribution newdir cleanup distributionfile = do
] ]
unless tarok $ unless tarok $
error $ "failed to untar " ++ distributionfile error $ "failed to untar " ++ distributionfile
sanitycheck tmpdir sanitycheck $ tmpdir </> installBase
installby rename newdir (tmpdir </> installBase) installby rename newdir (tmpdir </> installBase)
let deleteold = do let deleteold = do
deleteFromManifest olddir deleteFromManifest olddir
@ -208,8 +208,8 @@ upgradeToDistribution newdir cleanup distributionfile = do
=<< dirContents srcdir =<< dirContents srcdir
#endif #endif
sanitycheck dir = sanitycheck dir =
unlessM (doesDirectoryExist $ dir </> installBase) $ unlessM doesDirectoryExist $
error $ "did not find " ++ installBase ++ " in " ++ distributionfile error $ "did not find " ++ dir ++ " in " ++ distributionfile
makeorigsymlink olddir = do makeorigsymlink olddir = do
let origdir = parentDir olddir </> installBase let origdir = parentDir olddir </> installBase
nukeFile origdir nukeFile origdir