This commit is contained in:
timerix 2023-02-08 23:38:33 +06:00
parent ca99699406
commit 21600fcf20
2 changed files with 30 additions and 10 deletions

View File

@ -1,18 +1,13 @@
# cbuild
My C/C++ build system written in bash.
Repo contains some scripts (functions, init, etc.), which can be used in your custom task scripts. There are also some default tasks.
Repo contains some functions, which can be used in your custom task scripts. There are also some default tasks.
All tasks should be launched through `Makefile`. Tasks can be configured in `current.config` file (it is automatically created by init.sh).
All tasks can be launched through `Makefile` or `cbuild/call_task.sh`. Tasks can be configured in `current.config`.
## How to set up
```bash
cd some_project
git clone http://github.com/Timerix22/cbuild.git
cp cbuild/default.Makefile Makefile
bash cbuild/chmod_scripts.sh
make
git clone http://github.com/Timerix22/cbuild.git && \
cbuild/setup.sh submodule
```
You should create your own default config. Put it in project directory and name default.config
Than create your project `default.config` based on `cbuild/default.config`.

25
setup.sh Normal file
View File

@ -0,0 +1,25 @@
#!/bin/bash
if [ $# -eq 0 ] || [ "$1" = "h" ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "/?" ]; then
echo "usage: setup.sh [ submodule | standalone ]"
echo " submodule - add to existing git repo as submodule"
echo " standalone - keep independent git repo"
fi
case $1 in
submodule)
echo "mode - $1"
git submodule add cbuild
;;
standalone)
echo "mode - $1"
;;
*)
echo "invalid argument: $1"
exit 1
;;
esac
cp cbuild/default.Makefile Makefile
cp cbuild/default.config
bash cbuild/chmod_scripts.sh