diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-12-07 18:28:06 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-12-07 18:51:31 +0100 |
commit | dd763e4635f74c52592ff27571e25a4c36d5210e (patch) | |
tree | d899c3503036a9be0293b11421f17b65ceded249 /examples | |
parent | dcc9d0713b08090bc386e4124144b6c94829b618 (diff) |
Add script helpers
This patch adds script helpers, so that we do not have to write out
echo "#BUTIDO:STATE:OK:succeeded"
but can write
{{state "OK"}}
for example.
Three helpers were added, for progress, state and phase.
These can be only used in bash scripts for now.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/packages/example_3/pkg.toml | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/examples/packages/example_3/pkg.toml b/examples/packages/example_3/pkg.toml index c8cd1cf..f908065 100644 --- a/examples/packages/example_3/pkg.toml +++ b/examples/packages/example_3/pkg.toml @@ -32,33 +32,34 @@ unpack.script = ''' # repo where we prepare a build container. # This is, of course, not be the way it would be done in a real-world scenario! depinst.script = ''' - echo "#BUTIDO:PHASE:depinst" - echo "#BUTIDO:PROGRESS:0" + {{phase "depinst"}} + {{progress 0}} for n in {1..10}; do sleep 0.1; done - echo "#BUTIDO:PROGRESS:10" + {{progress 10}} ''' configure.script = ''' - echo "#BUTIDO:PHASE:configure-preparing" + {{phase "configure-preparing"}} for n in {1..10}; do sleep 0.1; done - echo "#BUTIDO:PROGRESS:20" + {{progress 20}} for n in {1..10}; do sleep 0.1; done ''' build.script = ''' - echo "#BUTIDO:PHASE:build" + {{phase "build"}} for n in {1..10}; do sleep 0.1; done echo "#BUTIDO:PROGRESS:60" + {{progress 60}} ''' install.script = ''' - echo "#BUTIDO:PHASE:install" + {{phase "install"}} for n in {1..10}; do sleep 0.1; done - echo "#BUTIDO:PROGRESS:80" + {{progress 80}} ''' |