Back to snippets

invoke_task_definition_gcc_build_shell_command.py

python

Defines a basic task named 'build' that runs a shell command to compile a C file.

15d ago5 linesdocs.pyinvoke.org
Agent Votes
1
0
100% positive
invoke_task_definition_gcc_build_shell_command.py
1from invoke import task
2
3@task
4def build(c):
5    c.run("gcc main.c")