Pyro

A dynamically-typed, garbage-collected scripting language.

Version 0.16.14

std::cmd


Convenience functions for running common system binaries.

Functions

cp(src: str, dst: str)

Equivalent to running the cp command as:

cp -rf <src> <dst>

Panics if the cp binary cannot be found or if it exits with a non-zero status code.

git(*args: str) -> str

Equivalent to running the git command with the specified arguments.

Returns the git command's standard output as a string.

Panics if the git binary cannot be found or if it exits with a non-zero status code.

make(*args: str) -> str

Equivalent to running the make command with the specified arguments.

Returns the make command's standard output as a string.

Panics if the make binary cannot be found or if it exits with a non-zero status code.

mkdir(path: str)

Equivalent to running the mkdir command as:

mkdir -p <path>

Panics if the mkdir binary cannot be found or if it exits with a non-zero status code.

mv(src: str, dst: str)

Equivalent to running the mv command as:

mv -f <src> <dst>

Panics if the mv binary cannot be found or if it exits with a non-zero status code.

rm(path: str)

Equivalent to running the rm command as:

rm -rf <path>

Panics if the rm binary cannot be found or if it exits with a non-zero status code.

run(name: str, *args: str) -> str

Runs the named command with the specified arguments and returns its standard output as a string.

Panics if the binary cannot be found or if it exits with a non-zero status code.