module Control.Eternal.System.Exec
  ( exec,
    exc,
  ) where

import System.Directory (setCurrentDirectory)
import System.Process (runCommand, waitForProcess)

exec :: [Char] -> IO()
exec args = do
    pid <- runCommand args
    waitForProcess pid >> return ()

exc :: [Char] -> [Char] -> IO()
exc path args = setCurrentDirectory path >> exec args