Safe Haskell | None |
---|
- link :: FilePath -> FilePath -> Script Actions ()
- register :: FilePath -> Script Actions ()
- copy :: FilePath -> FilePath -> Script Actions ()
- substitute :: FilePath -> FilePath -> Script Actions ()
- patch :: FilePath -> FilePath -> PatchSpec -> Script Actions ()
- shell :: String -> Script Actions ()
- raw :: FilePath -> [String] -> Script Actions ()
- profile :: String -> Script Sources a -> Script Sources a
- group :: String -> Script Sources a -> Script Sources a
- sudo :: String -> Script s a -> Script s a
- reacting :: React -> Script s a -> Script s a
- prerequisiteOf :: Script Sources a -> Script Sources b -> Script Sources b
- (<~>) :: Script Sources a -> Script Sources b -> Script Sources b
Actions layer primitives
link :: FilePath -> FilePath -> Script Actions ()Source
Links given file to specified filepath
git "https://example.com/source.git" "git/source" $ link "some-file" "anywhere"
Links ~/git/source/some-file
to ~/anywhere
.
register :: FilePath -> Script Actions ()Source
Links source to specified filepath
git "https://example.com/source.git" "git/source" $ register "somewhere"
Links ~/git/source
to ~/somewhere
.
copy :: FilePath -> FilePath -> Script Actions ()Source
Copies given file to specified filepath
git "https://example.com/source.git" "git/source" $ copy "some-file" "anywhere"
Copies ~/git/source/some-file
to ~/anywhere
.
substitute :: FilePath -> FilePath -> Script Actions ()Source
Substitutes templates in HStringTemplate
syntax
in given file and writes result to specified filepath
git "https://example.com/source.git" "git/source" $ substitute "some-file.template" "anywhere"
Copies ~/git/source/some-file.template
to ~/anywhere
.
Substitutes templates in ~/anywhere
with values from
templates
part of Controls
patch :: FilePath -> FilePath -> PatchSpec -> Script Actions ()Source
Applies the patch given the PatchSpec
git "https://example.com/source.git" "git/source" $ patch "some-patch.patch" "anywhere" (def { reversely = True })
Applies ~/git/source/some-patch.patch
to ~/anywhere
reversely.
shell :: String -> Script Actions ()Source
Executes shell command with default shell
git "https://example.com/source.git" "git/source" $ shell "echo hello"
Prints "hello\n" to stdout
raw :: FilePath -> [String] -> Script Actions ()Source
Executes raw command
git "https://example.com/source.git" "git/source" $ raw "/bin/echo" ["-n", "hello"]
Prints "hello" to stdout
Modifiers
profile :: String -> Script Sources a -> Script Sources aSource
Provides convenient Sources
grouping. May be nested
Information about sources and files related to a particular
profile profile
could be found in ~/.biegunka/profiles/
.
Example usage:
profile "dotfiles" $ do group "mine" $ git "https://github.com/supki/.dotfiles" ... group "not-mine" $ git "https://github.com/dmalikov/dotfiles" ... profile "experimental" $ do git "https://github.com/ekmett/lens" ...
group :: String -> Script Sources a -> Script Sources aSource
Alias for profile
. May be useful for nested grouping