@task
def format():
"""
Formats source code.
"""
system("clang-format -i *.c")
@task
def publish():
"""
Publish binary to molodetz.nl package manager.
"""
system("publish rd")
@task
def build():
"""
Formats and builds rd executable.
"""
format()
system("gcc -o rd rd.c -Ofast -Werror -Wall -pedantic -Wextra")
@task
def run():
"""
Format, build and run rd.
"""
build()
os.system("./rd")