bash-0.1.7: Bash generation library.

Safe HaskellNone

Language.Bash.Lib

Description

Shortcuts for Bash generation that also demonstrate use of the library.

Synopsis

Documentation

cmd :: Expression t -> [Expression t] -> Statement tSource

Create a simple command from expressions.

esed :: Monoid m => Identifier -> Bool -> Annotated mSource

Declare or assign an array to a sed command line that will use extended regular expressions, checking for GNU or BSD sed. The Bool argument determines whether to insert the declaration or not.

for :: (Monoid m, Integral i, Show i) => Identifier -> i -> i -> Annotated m -> Statement mSource

Perform a statement for integer values ranging from the first integral parameter to the second, using seq.

seqAZ :: (Integral i, Show i) => i -> i -> Statement tSource

Evaluate seq for the given arguments.

setSafe :: Statement tSource

A set statement that covers a few error handling options, setting errexit, nounset and pipefail.

sudo_write :: Monoid m => Expression m -> Statement mSource

A statement that allows one to redirect output to a file as root. This is what you might expect sudo echo x > privileged_file would do (though that does not actually work).

ann_ :: Monoid m => Statement m -> Annotated mSource

Annotate a statement with the 0 value of a monoid.