b9-2.1.0: A tool and library for building virtual machine images.

Safe HaskellNone
LanguageHaskell2010

B9.ShellScript

Description

Definition of Script and functions to convert Scripts to bash scripts.

Synopsis

Documentation

writeSh :: FilePath -> Script -> IO () Source #

Convert script to bash-shell-script written to file and make file executable.

emptyScript :: Script -> Bool Source #

Check if a script has the same effect as NoOP

data CmdVerbosity Source #

Constructors

Debug 
Verbose 
OnlyStdErr 
Quiet 
Instances
Eq CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

Data CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CmdVerbosity -> c CmdVerbosity #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CmdVerbosity #

toConstr :: CmdVerbosity -> Constr #

dataTypeOf :: CmdVerbosity -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CmdVerbosity) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CmdVerbosity) #

gmapT :: (forall b. Data b => b -> b) -> CmdVerbosity -> CmdVerbosity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CmdVerbosity -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CmdVerbosity -> r #

gmapQ :: (forall d. Data d => d -> u) -> CmdVerbosity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CmdVerbosity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CmdVerbosity -> m CmdVerbosity #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CmdVerbosity -> m CmdVerbosity #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CmdVerbosity -> m CmdVerbosity #

Read CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

Show CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

Generic CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

Associated Types

type Rep CmdVerbosity :: Type -> Type #

Hashable CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

Binary CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

NFData CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

Methods

rnf :: CmdVerbosity -> () #

type Rep CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

type Rep CmdVerbosity = D1 (MetaData "CmdVerbosity" "B9.ShellScript" "b9-2.1.0-RZRDTT94jm9r60J5nt33" False) ((C1 (MetaCons "Debug" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Verbose" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "OnlyStdErr" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Quiet" PrefixI False) (U1 :: Type -> Type)))

data Cwd Source #

Constructors

Cwd FilePath 
NoCwd 
Instances
Eq Cwd Source # 
Instance details

Defined in B9.ShellScript

Methods

(==) :: Cwd -> Cwd -> Bool #

(/=) :: Cwd -> Cwd -> Bool #

Data Cwd Source # 
Instance details

Defined in B9.ShellScript

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Cwd -> c Cwd #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Cwd #

toConstr :: Cwd -> Constr #

dataTypeOf :: Cwd -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Cwd) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Cwd) #

gmapT :: (forall b. Data b => b -> b) -> Cwd -> Cwd #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Cwd -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Cwd -> r #

gmapQ :: (forall d. Data d => d -> u) -> Cwd -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Cwd -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Cwd -> m Cwd #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Cwd -> m Cwd #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Cwd -> m Cwd #

Read Cwd Source # 
Instance details

Defined in B9.ShellScript

Show Cwd Source # 
Instance details

Defined in B9.ShellScript

Methods

showsPrec :: Int -> Cwd -> ShowS #

show :: Cwd -> String #

showList :: [Cwd] -> ShowS #

Generic Cwd Source # 
Instance details

Defined in B9.ShellScript

Associated Types

type Rep Cwd :: Type -> Type #

Methods

from :: Cwd -> Rep Cwd x #

to :: Rep Cwd x -> Cwd #

Hashable Cwd Source # 
Instance details

Defined in B9.ShellScript

Methods

hashWithSalt :: Int -> Cwd -> Int #

hash :: Cwd -> Int #

Binary Cwd Source # 
Instance details

Defined in B9.ShellScript

Methods

put :: Cwd -> Put #

get :: Get Cwd #

putList :: [Cwd] -> Put #

NFData Cwd Source # 
Instance details

Defined in B9.ShellScript

Methods

rnf :: Cwd -> () #

type Rep Cwd Source # 
Instance details

Defined in B9.ShellScript

type Rep Cwd = D1 (MetaData "Cwd" "B9.ShellScript" "b9-2.1.0-RZRDTT94jm9r60J5nt33" False) (C1 (MetaCons "Cwd" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath)) :+: C1 (MetaCons "NoCwd" PrefixI False) (U1 :: Type -> Type))

data User Source #

Constructors

User String 
NoUser 
Instances
Eq User Source # 
Instance details

Defined in B9.ShellScript

Methods

(==) :: User -> User -> Bool #

(/=) :: User -> User -> Bool #

Data User Source # 
Instance details

Defined in B9.ShellScript

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> User -> c User #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c User #

toConstr :: User -> Constr #

dataTypeOf :: User -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c User) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c User) #

gmapT :: (forall b. Data b => b -> b) -> User -> User #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> User -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> User -> r #

gmapQ :: (forall d. Data d => d -> u) -> User -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> User -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> User -> m User #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> User -> m User #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> User -> m User #

Read User Source # 
Instance details

Defined in B9.ShellScript

Show User Source # 
Instance details

Defined in B9.ShellScript

Methods

showsPrec :: Int -> User -> ShowS #

show :: User -> String #

showList :: [User] -> ShowS #

Generic User Source # 
Instance details

Defined in B9.ShellScript

Associated Types

type Rep User :: Type -> Type #

Methods

from :: User -> Rep User x #

to :: Rep User x -> User #

Hashable User Source # 
Instance details

Defined in B9.ShellScript

Methods

hashWithSalt :: Int -> User -> Int #

hash :: User -> Int #

Binary User Source # 
Instance details

Defined in B9.ShellScript

Methods

put :: User -> Put #

get :: Get User #

putList :: [User] -> Put #

NFData User Source # 
Instance details

Defined in B9.ShellScript

Methods

rnf :: User -> () #

type Rep User Source # 
Instance details

Defined in B9.ShellScript

type Rep User = D1 (MetaData "User" "B9.ShellScript" "b9-2.1.0-RZRDTT94jm9r60J5nt33" False) (C1 (MetaCons "User" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "NoUser" PrefixI False) (U1 :: Type -> Type))

data Script Source #

Instances
Eq Script Source # 
Instance details

Defined in B9.ShellScript

Methods

(==) :: Script -> Script -> Bool #

(/=) :: Script -> Script -> Bool #

Data Script Source # 
Instance details

Defined in B9.ShellScript

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Script -> c Script #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Script #

toConstr :: Script -> Constr #

dataTypeOf :: Script -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Script) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Script) #

gmapT :: (forall b. Data b => b -> b) -> Script -> Script #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Script -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Script -> r #

gmapQ :: (forall d. Data d => d -> u) -> Script -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Script -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Script -> m Script #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Script -> m Script #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Script -> m Script #

Read Script Source # 
Instance details

Defined in B9.ShellScript

Show Script Source # 
Instance details

Defined in B9.ShellScript

Generic Script Source # 
Instance details

Defined in B9.ShellScript

Associated Types

type Rep Script :: Type -> Type #

Methods

from :: Script -> Rep Script x #

to :: Rep Script x -> Script #

Semigroup Script Source # 
Instance details

Defined in B9.ShellScript

Monoid Script Source # 
Instance details

Defined in B9.ShellScript

Hashable Script Source # 
Instance details

Defined in B9.ShellScript

Methods

hashWithSalt :: Int -> Script -> Int #

hash :: Script -> Int #

Binary Script Source # 
Instance details

Defined in B9.ShellScript

Methods

put :: Script -> Put #

get :: Get Script #

putList :: [Script] -> Put #

NFData Script Source # 
Instance details

Defined in B9.ShellScript

Methods

rnf :: Script -> () #

type Rep Script Source # 
Instance details

Defined in B9.ShellScript

type Rep Script = D1 (MetaData "Script" "B9.ShellScript" "b9-2.1.0-RZRDTT94jm9r60J5nt33" False) ((C1 (MetaCons "In" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Script])) :+: (C1 (MetaCons "As" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Script])) :+: C1 (MetaCons "IgnoreErrors" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Script])))) :+: ((C1 (MetaCons "Verbosity" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CmdVerbosity) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Script])) :+: C1 (MetaCons "Begin" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Script]))) :+: (C1 (MetaCons "Run" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String])) :+: C1 (MetaCons "NoOP" PrefixI False) (U1 :: Type -> Type))))