Bash: implemented installer script for server and modules (beta)

+ minor fixes
This commit is contained in:
Yehonal
2017-09-21 18:52:20 +02:00
parent ce6b9de51a
commit 22c6ba9fa6
13 changed files with 272 additions and 15 deletions

View File

@@ -19,6 +19,14 @@ first of all, if you need some custom configuration you have to copy and rename
./3-build.sh
## compiler.sh
compiler.sh script contains an interactive menu to clean/compile/build. You can also run actions directly by command lines specifying the option.
Ex:
./compiler.sh 3
It will start the build process (it's equivalent to ./3-build.sh)
## Note:
For an optimal development process and **really faster** compilation time, is suggested to use clang instead of gcc

View File

@@ -5,9 +5,9 @@ CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_PATH/includes/includes.sh"
function all() {
clean
configure
build
comp_clean
comp_configure
comp_build
}
function run_option() {
@@ -19,7 +19,7 @@ function run_option() {
}
comp_options=("Clean" "Configure" "Build" "All")
comp_functions=("clean" "configure" "build" "all")
comp_functions=("comp_clean" "comp_configure" "comp_build" "all")
runHooks "ON_AFTER_OPTIONS" #you can create your custom options

View File

@@ -1,5 +1,5 @@
function clean() {
function comp_clean() {
echo "Cleaning build files"
CWD=$(pwd)
@@ -13,7 +13,7 @@ function clean() {
cd $CWD
}
function configure() {
function comp_configure() {
CWD=$(pwd)
cd $BUILDPATH
@@ -39,7 +39,7 @@ function configure() {
}
function build() {
function comp_build() {
[ $MTHREADS == 0 ] && MTHREADS=`grep -c ^processor /proc/cpuinfo` && MTHREADS=$(($MTHREADS + 2))
echo "Using $MTHREADS threads"