fix build in clean tree

removeDirectoryRecursive fails if the directory DNE.
This commit is contained in:
Joey Hess 2020-08-03 19:43:21 -04:00
parent 88e5ebcda7
commit bdfe6f7420
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -155,12 +155,14 @@ installLocales topdir = cp "/usr/share/i18n" (topdir </> "i18n")
installSkel :: FilePath -> FilePath -> IO ()
#ifdef darwin_HOST_OS
installSkel topdir basedir = do
removeDirectoryRecursive basedir
whenM (doesDirectoryExist basedir) $
removeDirectoryRecursive basedir
unlessM (boolSystem "cp" [Param "-R", File "standalone/osx/git-annex.app", File basedir]) $
error "cp failed"
#else
installSkel topdir _basedir = do
removeDirectoryRecursive topdir
whenM (doesDirectoryExist topdir) $
removeDirectoryRecursive topdir
unlessM (boolSystem "cp" [Param "-R", File "standalone/linux/skel", File topdir]) $
error "cp failed"
#endif