diff options
-rw-r--r-- | bin/compiler/includes/defines.sh | 8 | ||||
-rw-r--r-- | bin/compiler/includes/includes.sh | 3 | ||||
-rw-r--r-- | bin/db_assembler/includes/functions.sh | 8 | ||||
-rw-r--r-- | conf/config.sh.dist | 6 |
4 files changed, 14 insertions, 11 deletions
diff --git a/bin/compiler/includes/defines.sh b/bin/compiler/includes/defines.sh index b60a591089..2f08dd7c85 100644 --- a/bin/compiler/includes/defines.sh +++ b/bin/compiler/includes/defines.sh @@ -5,10 +5,6 @@ then CCTYPE=${CCTYPE^} # capitalize first letter if it's not yet fi -BUILDPATH=$BINPATH +[ $CTYPE == "Debug" ] && BUILDPATH="$BUILDPATH/debug/" || BUILDPATH="$BUILDPATH/release/" -INSTALL_PATH=$(readlink -f "$BINPATH/../") - -[ $CTYPE == "Debug" ] && BUILDPATH="$BUILDPATH/debug/build/" || BUILDPATH="$BUILDPATH/release/build/" - -[ $CTYPE == "Debug" ] && BINPATH="$BINPATH/debug" || BINPATH="$BINPATH/release" +[ $CTYPE == "Debug" ] && BINPATH="$BINPATH/debug/" || BINPATH="$BINPATH/release/" diff --git a/bin/compiler/includes/includes.sh b/bin/compiler/includes/includes.sh index 4383caf84b..ffde93a73e 100644 --- a/bin/compiler/includes/includes.sh +++ b/bin/compiler/includes/includes.sh @@ -10,8 +10,7 @@ fi function ac_on_after_build() { # move the run engine - mkdir -p "$INSTALL_PATH/bin/" - cp -rvf "$AC_PATH_MODULES/acore/startup-scripts/"* "$INSTALL_PATH/bin/" + cp -rvf "$AC_PATH_MODULES/acore/startup-scripts/"* "$BINPATH" } registerHooks "ON_AFTER_BUILD" ac_on_after_build diff --git a/bin/db_assembler/includes/functions.sh b/bin/db_assembler/includes/functions.sh index 37dcbaa0e7..946365372d 100644 --- a/bin/db_assembler/includes/functions.sh +++ b/bin/db_assembler/includes/functions.sh @@ -29,6 +29,10 @@ function dbasm_mysqlExec() { read -p "Insert mysql pass:" -s PROMPT_PASS export MYSQL_PWD=$PROMPT_PASS + # create configured account if not exists + "$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" $options -e "CREATE USER '${MYSQL_USER}'@'${MYSQL_HOST}' IDENTIFIED BY '${MYSQL_PASS}' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;" + "$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" $options -e "GRANT USAGE ON * . * TO '${MYSQL_USER}'@'${MYSQL_HOST}' WITH GRANT OPTION;" + retval=$("$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" $options -e "$command") else exit @@ -73,11 +77,15 @@ function dbasm_createDB() { eval $confs + CONF_USER=$MYSQL_USER + CONF_PASS=$MYSQL_PASS + if dbasm_dbExists $dbname "$confs"; then echo "$dbname database exists" else echo "Creating DB ${dbname} ..." dbasm_mysqlExec "$confs" "CREATE DATABASE \`${dbname}\`" "" + dbasm_mysqlExec "$confs" "GRANT ALL PRIVILEGES ON \`${dbname}\` . * TO '${CONF_USER}'@'${MYSQL_HOST}' WITH GRANT OPTION;" fi } diff --git a/conf/config.sh.dist b/conf/config.sh.dist index ad0f4826bc..5aeff93dfc 100644 --- a/conf/config.sh.dist +++ b/conf/config.sh.dist @@ -2,13 +2,13 @@ SRCPATH="$AC_PATH_ROOT" # absolute path where build files must be stored -BUILDPATH="$AC_PATH_ROOT/build/" +BUILDPATH="$AC_PATH_ROOT/build/obj" # absolute path where binary files must be stored -BINPATH="$AC_PATH_ROOT/build/bin/" +BINPATH="$AC_PATH_ROOT/build/dist" # absolute path where config. files must be stored -CONFDIR="$AC_PATH_ROOT/build/bin/etc/" +CONFDIR="$AC_PATH_ROOT/build/dist/etc/" ############################################## # |