mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-06-13 14:22:07 +03:00
build.sh add help [skip ci]
This commit is contained in:
parent
f57f3d7bb9
commit
69b0003e3f
21
build.sh
21
build.sh
@ -1,8 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
CC=gcc
|
CC=gcc
|
||||||
CXX=g++
|
CXX=g++
|
||||||
|
|
||||||
|
if [[ "$*" =~ "--help" ]]; then
|
||||||
|
help
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
|
||||||
n=0
|
n=0
|
||||||
args=()
|
args=()
|
||||||
for i in "$@"
|
for i in "$@"
|
||||||
@ -37,3 +44,17 @@ pushd build &> /dev/null
|
|||||||
CC=$CC CXX=$CXX cmake ${args[@]} ..
|
CC=$CC CXX=$CXX cmake ${args[@]} ..
|
||||||
make ${jobs}
|
make ${jobs}
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
help()
|
||||||
|
{
|
||||||
|
printf "Usage: ./build.sh <options>\n\n"
|
||||||
|
printf " -c= | --compiler=<icc|gcc|clang> - Select preferred C/C++ compiler to build\n"
|
||||||
|
printf " -j= | --jobs=<N> - Specifies the number of jobs (commands) to run simultaneously (For faster building)\n\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Initialize
|
||||||
|
main $*
|
||||||
|
|
||||||
|
# Exit normally
|
||||||
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user