setup.sh
This commit is contained in:
parent
ca99699406
commit
21600fcf20
15
README.md
15
README.md
@ -1,18 +1,13 @@
|
|||||||
# cbuild
|
# cbuild
|
||||||
My C/C++ build system written in bash.
|
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
|
## How to set up
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd some_project
|
git clone http://github.com/Timerix22/cbuild.git && \
|
||||||
git clone http://github.com/Timerix22/cbuild.git
|
cbuild/setup.sh submodule
|
||||||
cp cbuild/default.Makefile Makefile
|
|
||||||
bash cbuild/chmod_scripts.sh
|
|
||||||
make
|
|
||||||
```
|
```
|
||||||
|
Than create your project `default.config` based on `cbuild/default.config`.
|
||||||
You should create your own default config. Put it in project directory and name default.config
|
|
||||||
|
|||||||
25
setup.sh
Normal file
25
setup.sh
Normal 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
|
||||||
Loading…
Reference in New Issue
Block a user