mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-13 19:15:44 -07:00
clean up build-script handling
This commit is contained in:
@@ -467,11 +467,9 @@ recompile force = io $ do
|
|||||||
libTs <- mapM getModTime . Prelude.filter isSource =<< allFiles lib
|
libTs <- mapM getModTime . Prelude.filter isSource =<< allFiles lib
|
||||||
useBuildscript <- do
|
useBuildscript <- do
|
||||||
exists <- doesFileExist buildscript
|
exists <- doesFileExist buildscript
|
||||||
if exists then do
|
if exists
|
||||||
permissions <- getPermissions buildscript
|
then executable <$> getPermissions buildscript
|
||||||
return $ executable permissions
|
else return False
|
||||||
else
|
|
||||||
return False
|
|
||||||
srcT <- getModTime src
|
srcT <- getModTime src
|
||||||
binT <- getModTime bin
|
binT <- getModTime bin
|
||||||
buildScriptT <- getModTime buildscript
|
buildScriptT <- getModTime buildscript
|
||||||
@@ -528,7 +526,7 @@ recompile force = io $ do
|
|||||||
, "-o", binn
|
, "-o", binn
|
||||||
] (Just dir) Nothing Nothing Nothing (Just errHandle)
|
] (Just dir) Nothing Nothing Nothing (Just errHandle)
|
||||||
compileScript binn dir script errHandle =
|
compileScript binn dir script errHandle =
|
||||||
runProcess script [dir, binn] (Just dir) Nothing Nothing Nothing (Just errHandle)
|
runProcess script [binn] (Just dir) Nothing Nothing Nothing (Just errHandle)
|
||||||
|
|
||||||
-- | Conditionally run an action, using a @Maybe a@ to decide.
|
-- | Conditionally run an action, using a @Maybe a@ to decide.
|
||||||
whenJust :: Monad m => Maybe a -> (a -> m ()) -> m ()
|
whenJust :: Monad m => Maybe a -> (a -> m ()) -> m ()
|
||||||
|
Reference in New Issue
Block a user