easily manage build commands
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.8 KiB

  1. # dirbuild
  2. Easily manage build commands
  3. ## Description
  4. Building software involves the execution of some configuration steps, the
  5. building helper it self and maybe some other things. Each project has it's very
  6. own structure, so remembering the exact commands for all projects is hard.
  7. This small script aims to help with this.
  8. You can set a specific command needed to build the software in your current
  9. directory, and afterward call only `dirbuild`, which will handle the build for
  10. you.
  11. ## Installation
  12. Clone this repo or just download the script
  13. [dirbuild.py](https://git.schneider-hosting.de/schneider/dirbuild/raw/branch/master/dirbuild.py).
  14. Save it for example at your users bin folder at `~/bin`
  15. This sript uses pyxdg and docopt. Install manually or after cloning this repo by
  16. `pip install -r requirements.txt`.
  17. ## Usage
  18. ```
  19. dirbuild
  20. Usage:
  21. dirbuild
  22. dirbuild set <command>
  23. dirbuild get
  24. dirbuild build
  25. dirbuild dump
  26. Options:
  27. -h --help Show this screen.
  28. --version Show version.
  29. ```
  30. An example workflow would look like this. Assume we have cloned the neovim repo
  31. to `~/git/build/neovim` and we already are in this folder.
  32. At the first time we have to set the command we need to build the software:
  33. ```
  34. dirbuild set "CFLAGS=\"-march=native -pipe\" CXXFLAGS=\"$CFLAGS\" make -j8 && sudo make install"
  35. ```
  36. We could check the saved command by entering `dirbuild get`, which will print
  37. the same command.
  38. If we want to build this software, we only have to execute `dirbuild`.
  39. In the future we can update the code, for example by pulling the repo `git pull`
  40. and executing again `dirbuild`.
  41. Upating the building command can be done by issuing again `dirbuild set` with
  42. the updated command. Old commands are stored in the database an can be retrieved
  43. via `dirbuild dump`.