Schneider
043983dd8b
|
4 years ago | |
---|---|---|
.gitignore | 4 years ago | |
README.md | 4 years ago | |
dirbuild.py | 4 years ago | |
requirements.txt | 4 years ago |
README.md
dirbuild
Easily manage build commands
Description
Building software involves the execution of some configuration steps, the
building helper it self and maybe some other things. Each project has it's very
own structure, so remembering the exact commands for all projects is hard.
This small script aims to help with this.
You can set a specific command needed to build the software in your current
directory, and afterward call only dirbuild
, which will handle the build for
you.
Installation
Clone this repo or just download the script
dirbuild.py.
Save it for example at your users bin folder at ~/bin
This sript uses pyxdg and docopt. Install manually or after cloning this repo by
pip install -r requirements.txt
.
Usage
dirbuild
Usage:
dirbuild
dirbuild set <command>
dirbuild get
dirbuild build
dirbuild dump
Options:
-h --help Show this screen.
--version Show version.
An example workflow would look like this. Assume we have cloned the neovim repo
to ~/git/build/neovim
and we already are in this folder.
At the first time we have to set the command we need to build the software:
dirbuild set "CFLAGS=\"-march=native -pipe\" CXXFLAGS=\"$CFLAGS\" make -j8 && sudo make install"
We could check the saved command by entering dirbuild get
, which will print
the same command.
If we want to build this software, we only have to execute dirbuild
.
In the future we can update the code, for example by pulling the repo git pull
and executing again dirbuild
.
Upating the building command can be done by issuing again dirbuild set
with
the updated command. Old commands are stored in the database an can be retrieved
via dirbuild dump
.