handsy-0.0.12: A DSL to describe common shell operations and interpeters for running them locally and remotely.

Safe HaskellNone
LanguageHaskell2010

System.Handsy.Util

Contents

Synopsis

Helpers for parsing return values of command and shell

strLines :: ByteString -> [String] Source

Extract lines from a ByteString. Useful for parsing unix commands.

Frequently used functionality

sleep :: Int -> Handsy () Source

Waits specified number of seconds

mkTemp :: String -> Handsy String Source

Creates a temporary file

mkTempDir :: String -> Handsy String Source

Creates a temporary directory

isRunning :: String -> Handsy Bool Source

Returns if the specified process is running. Uses pidof

data OS Source

Instances

os :: Handsy (Maybe OS) Source

Guesses the os using `/etc/os-release`. This currently only supports Linux distributions abiding systemd standards.