Browse Source

Add readme and requirements

master
Schneider 3 years ago
parent
commit
043983dd8b
Signed by: schneider GPG Key ID: 3F50B02A50039F3B
  1. 58
      README.md
  2. 2
      requirements.txt

58
README.md

@ -0,0 +1,58 @@
# 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](https://git.schneider-hosting.de/schneider/dirbuild/raw/branch/master/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`.

2
requirements.txt

@ -0,0 +1,2 @@
docopt==0.6.2
pyxdg==0.26
Loading…
Cancel
Save