summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2017-10-13 19:22:30 +0200
committerYehonal <yehonal.azeroth@gmail.com>2017-10-13 19:22:53 +0200
commitc64f8d8e825731966f48e76aab183aca3f969f0d (patch)
tree05d072bb5b08d217a812adac1032832c6b3699bb /modules
parentb24a2ea13e13c2b090f8a0be85761070072cdf26 (diff)
Fixed compilation after dir rework
Diffstat (limited to 'modules')
-rw-r--r--modules/drassil/cmake-utils/.gitignore50
-rw-r--r--modules/drassil/cmake-utils/utils.cmake137
-rw-r--r--modules/drassil/mysql-tools/.gitignore13
-rw-r--r--modules/drassil/mysql-tools/README53
-rw-r--r--modules/drassil/mysql-tools/bin/dump-parserbin13355 -> 0 bytes
-rw-r--r--modules/drassil/mysql-tools/bin/mysql.exebin4094976 -> 0 bytes
-rw-r--r--modules/drassil/mysql-tools/bin/mysqldump.exebin4079104 -> 0 bytes
-rw-r--r--modules/drassil/mysql-tools/bin/mysqlimport.exebin4013056 -> 0 bytes
-rw-r--r--modules/drassil/mysql-tools/build-dump-parser.sh5
-rw-r--r--modules/drassil/mysql-tools/dump-parser.c129
-rw-r--r--modules/drassil/mysql-tools/mysql-config.dist62
-rw-r--r--modules/drassil/mysql-tools/mysql-dump119
-rw-r--r--modules/drassil/mysql-tools/mysql-import109
-rw-r--r--modules/drassil/mysql-tools/mysql-tools23
-rw-r--r--modules/drassil/mysql-tools/shared-def34
15 files changed, 0 insertions, 734 deletions
diff --git a/modules/drassil/cmake-utils/.gitignore b/modules/drassil/cmake-utils/.gitignore
deleted file mode 100644
index 92da74b036..0000000000
--- a/modules/drassil/cmake-utils/.gitignore
+++ /dev/null
@@ -1,50 +0,0 @@
-!.gitignore
-
-!*
-
-#
-#Generic
-#
-
-.directory
-.mailmap
-*.orig
-*.rej
-*~
-.hg/
-*.kdev*
-.DS_Store
-CMakeLists.txt.user
-*.bak
-*.patch
-*.diff
-*.REMOTE.*
-*.BACKUP.*
-*.BASE.*
-*.LOCAL.*
-
-#
-# IDE & other softwares
-#
-/.settings/
-/.externalToolBuilders/*
-# exclude in all levels
-nbproject/
-.sync.ffs_db
-*.kate-swp
-
-#
-# Eclipse
-#
-*.pydevproject
-.metadata
-.gradle
-tmp/
-*.tmp
-*.swp
-*~.nib
-local.properties
-.settings/
-.loadpath
-.project
-.cproject
diff --git a/modules/drassil/cmake-utils/utils.cmake b/modules/drassil/cmake-utils/utils.cmake
deleted file mode 100644
index 6c89684d67..0000000000
--- a/modules/drassil/cmake-utils/utils.cmake
+++ /dev/null
@@ -1,137 +0,0 @@
-
-#
-# CU_SUBDIRLIST
-#
-FUNCTION(CU_SUBDIRLIST result curdir recursive includeRoot)
- # glob recurse seem's doesn't work
- FILE(GLOB children RELATIVE ${curdir} "${curdir}/[^\\.]*")
- if (${includeRoot})
- SET(dirlist "${curdir}")
- else()
- SET(dirlist "")
- endif()
-
- FOREACH(child ${children})
- IF(IS_DIRECTORY "${curdir}/${child}")
- if (${recursive})
- CU_SUBDIRLIST(sub_Dirs "${curdir}/${child}" TRUE FALSE)
- SET(dirlist "${curdir}/${child}" ${sub_Dirs} ${dirlist})
- else()
- SET(dirlist "${curdir}/${child}" ${dirlist})
- endif()
- ENDIF()
- ENDFOREACH()
- SET(${result} ${dirlist} PARENT_SCOPE)
-ENDFUNCTION(CU_SUBDIRLIST result curdir recursive)
-
-#
-# CU_SET_GLOBAL
-#
-MACRO(CU_SET_GLOBAL name val)
- set_property ( GLOBAL PROPERTY ${name} ${val})
- # after set , create the variable for current scope
- CU_GET_GLOBAL(${name})
-ENDMACRO()
-
-MACRO(CU_ADD_GLOBAL name val)
- CU_GET_GLOBAL(${name})
-
- set_property ( GLOBAL PROPERTY ${name}
- ${${name}}
- ${val}
- )
- # after set , create the variable for current scope
- CU_GET_GLOBAL(${name})
-ENDMACRO()
-
-#
-# CU_GET_GLOBAL
-#
-MACRO(CU_GET_GLOBAL name)
- get_property(${name} GLOBAL PROPERTY ${name})
-ENDMACRO()
-
-#
-# CU_SET_CACHE
-#
-MACRO(CU_SET_CACHE name val)
- set(${name} ${val} CACHE INTERNAL "CU Var")
-ENDMACRO()
-
-#
-# CU_LIST_ADD_CACHE
-#
-MACRO(CU_LIST_ADD_CACHE name val)
-
- # avoid duplicates
- if (";${${name}};" MATCHES ";${val};")
- # nothing to do for now
- else()
- set(${name} ${val} ${${name}} CACHE INTERNAL "CU Var")
- endif()
-ENDMACRO()
-
-
-#
-# CU_SET_PATH
-#
-MACRO(CU_SET_PATH name val)
- CU_SET_CACHE(${name} ${val})
-
- CU_ADD_INC_PATH(${val})
-ENDMACRO()
-
-#
-# CU_ADD_INC_PATH
-#
-MACRO(CU_ADD_INC_PATH val)
-
- if (";${CU_INC_PATHS};" MATCHES ";${val};")
- # nothing to do for now
- else()
- set(CU_INC_PATHS
- ${CU_INC_PATHS}
- ${val}
- )
-
- #update cache
- CU_SET_CACHE("CU_INC_PATHS" "${CU_INC_PATHS}")
- include_directories(${val})
- endif()
-ENDMACRO()
-
-
-#
-# CU_LOAD_INC_PATHS
-#
-MACRO(CU_LOAD_INC_PATHS)
- include_directories(${CU_INC_PATHS})
-ENDMACRO()
-
-#
-# CU_SET_PARENT
-#
-MACRO(CU_SET_PARENT name val)
- set(${name} ${val} PARENT_SCOPE)
-ENDMACRO()
-
-
-MACRO(CU_ADD_HOOK hook_name value)
- CU_ADD_GLOBAL(${hook_name} "${value}")
-ENDMACRO()
-
-MACRO(CU_RUN_HOOK hook_name)
- CU_GET_GLOBAL(${hook_name})
- message("Running cmake hook: ${hook_name}")
- if (${hook_name})
- set(HOOK_ARRAY ${${hook_name}})
- FOREACH (hook_file ${HOOK_ARRAY})
- message("Including ${hook_file}")
- include("${hook_file}")
- ENDFOREACH()
- else()
- message("No hooks registered for ${hook_name}")
- endif()
-ENDMACRO()
-
-
diff --git a/modules/drassil/mysql-tools/.gitignore b/modules/drassil/mysql-tools/.gitignore
deleted file mode 100644
index fa1ea4671a..0000000000
--- a/modules/drassil/mysql-tools/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-/mysql_config
-mysql_tools_(for usr-local-bin)
-
-#
-# Editors / debuggers / other output files
-#
-*~
-*.bak
-*.orig
-*.patch
-callgrind.out.*
-
-.upt.json
diff --git a/modules/drassil/mysql-tools/README b/modules/drassil/mysql-tools/README
deleted file mode 100644
index 453829ce72..0000000000
--- a/modules/drassil/mysql-tools/README
+++ /dev/null
@@ -1,53 +0,0 @@
-* Copyright (C) 2007 - 2015 Hyperweb2 All rights reserved.
-* GNU General Public License version 3; see www.hyperweb2.com/terms/
-
-#
-# HOW TO USE MYSQL_* tools
-#
-
-Before starting to dump/import, please rename mysql_config.dist in mysql_config and change infos using your configurations
-If you are using AppArmor , edit /etc/apparmor.d/usr.sbin.mysqld and add directory that must be used by the dump
-
-to easy dump/import the database, use ./mysql-tools command that includes dump and import scripts, instead if you need to separate the functions ,
- use ./mysql-dump and ./mysql-import.
-
-mysql-tools utilization:
-
-# This script automatically dump and import sql files
-#
-# syntax: ./mysql_tools <opt> <database> <tables> <method> <configpath>
-# OPT -> dump/import ( export / import tables )
-# TABLES -> use "," to separate table names; ex: mysql_dump "" "table1,table2..tableN". Leave blank to dump all tables.
-# DATABASE -> specify database to process, use "" for default ( see in mysql-config )
-# METHOD -> 0/1 (0: no fulldb,1: use fulldb) default: ( see in mysql-config )
-# CONFIGPATH -> specify alternative path of config file, use "" to check in source folder
-#
-
-
-mysql-dump utilization:
-
-# This script will export all tables from specified db and tables in separated sql files
-# it can also export the full db in a single sql file.
-#
-# syntax: ./mysql_dump <database> <tables> <method> <configpath>
-# options are not required, because values can be defined in config file:
-# DATABASE -> specify database to dump, use "" for default ( see in mysql-config )
-# TABLES -> use "" to dump all tables. Use "," to separate table names; ex: mysql_dump "" "table1,table2..tableN"
-# METHOD -> 0/1 (0: no fulldb,1: with fulldb) default: ( see in mysql-config )
-# CONFIGPATH -> specify alternative path for config file, use "" to check in source folder.
-#
-
-
-mysql-import utilization:
-
-# This script will import the contents of the sql/ directory to the MySQL database.
-# You can choose to import table by table, or the entire db
-#
-# syntax: ./mysql_import <database> <tables> <method> <configpath>
-# options are not required, because values can be defined in config file:
-#
-# DATABASE -> specify database to dump, use "" for default ( see in mysql-config )
-# TABLES -> use "," to separate table names; ex: mysql_dump "" "table1,table2..tableN" ..OR use "" to dump all tables.
-# METHOD -> 1/0 ( 1: by folder, 0: by full dump) default: ( see in mysql-config )
-# CONFIGPATH -> specify alternative path for config file, use "" to check in source folder.
-#
diff --git a/modules/drassil/mysql-tools/bin/dump-parser b/modules/drassil/mysql-tools/bin/dump-parser
deleted file mode 100644
index 6d07b528f1..0000000000
--- a/modules/drassil/mysql-tools/bin/dump-parser
+++ /dev/null
Binary files differ
diff --git a/modules/drassil/mysql-tools/bin/mysql.exe b/modules/drassil/mysql-tools/bin/mysql.exe
deleted file mode 100644
index 66267a989a..0000000000
--- a/modules/drassil/mysql-tools/bin/mysql.exe
+++ /dev/null
Binary files differ
diff --git a/modules/drassil/mysql-tools/bin/mysqldump.exe b/modules/drassil/mysql-tools/bin/mysqldump.exe
deleted file mode 100644
index 24355c07c3..0000000000
--- a/modules/drassil/mysql-tools/bin/mysqldump.exe
+++ /dev/null
Binary files differ
diff --git a/modules/drassil/mysql-tools/bin/mysqlimport.exe b/modules/drassil/mysql-tools/bin/mysqlimport.exe
deleted file mode 100644
index 8dc3613870..0000000000
--- a/modules/drassil/mysql-tools/bin/mysqlimport.exe
+++ /dev/null
Binary files differ
diff --git a/modules/drassil/mysql-tools/build-dump-parser.sh b/modules/drassil/mysql-tools/build-dump-parser.sh
deleted file mode 100644
index a38a195f81..0000000000
--- a/modules/drassil/mysql-tools/build-dump-parser.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-gcc -O2 -Wall -pedantic dump-parser.c -o ./bin/dump-parser
-
-read -p "done"
diff --git a/modules/drassil/mysql-tools/dump-parser.c b/modules/drassil/mysql-tools/dump-parser.c
deleted file mode 100644
index a9262d4f92..0000000000
--- a/modules/drassil/mysql-tools/dump-parser.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/* gcc -O2 -Wall -pedantic dump-parser.c -o dump-parser
- Usage: cat dump.sql | dump-parser
- Or : dump-parser dump.sql
- bugs :
- * the parser will fail if the 10001st character of a line is an escaped quote, it will see it as an unescaped quote.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdbool.h>
-#include <string.h>
-
-#define BUFFER 100000
-
-bool is_escaped(char* string, int offset) {
- if (offset == 0) {
- return false;
- } else if (string[offset - 1] == '\\') {
- return !is_escaped(string, offset - 1);
- } else {
- return false;
- }
-}
-
-bool is_commented(char* string) {
- char buffer[4];
-
- sprintf(buffer, "%.3s", string);
-
- return strcmp(buffer, "-- ") == 0;
-}
-
-int main(int argc, char *argv[])
-{
- FILE* file = argc > 1 ? fopen(argv[1], "r") : stdin;
-
- char buffer[BUFFER];
- char* line;
- int pos;
- int parenthesis = 0;
- bool quote = false;
- bool escape = false;
- bool comment = false;
-
- while (fgets(buffer, BUFFER, file) != NULL) {
- line = buffer;
-
- /* skip commented */
- if (comment || is_commented(line)) {
- comment = line[strlen(line) - 1] != '\n';
- fputs(line, stdout);
- } else {
- pos = 0;
-
- nullchar:
- while (line[pos] != '\0') {
- /* if we are still in escape state, we need to check first char. */
- if (!escape) {
- /* find any character in ()' */
- pos = strcspn(line, "()'\\");
- }
-
- if (pos > 0) {
- /* print before match */
- printf("%.*s", pos, line);
- }
-
- switch (line[pos]) {
- case '(':
- if (!quote) {
- if (parenthesis == 0) {
- putchar('\n');
- }
- parenthesis++;
- }
- if (escape) {
- escape = false;
- }
- break;
-
- case ')':
- if (!quote) {
- if (parenthesis > 0) {
- parenthesis--;
- } else {
- /* whoops */
- puts("\n");
- fputs(line, stdout);
- fputs("Found closing parenthesis without opening one.\n", stderr);
- exit(1);
- }
- }
- if (escape) {
- escape = false;
- }
- break;
-
- case '\\':
- escape = !escape;
- break;
-
- case '\'':
- if (escape) {
- escape = false;
- } else {
- quote = !quote;
- }
- break;
-
- case '\0':
- goto nullchar;
-
- default:
- if (escape) {
- escape = false;
- }
- break;
- }
-
- /* print char then skip it (to make sure we don’t double match) */
- putchar(line[pos]);
- line = line + pos + 1;
- pos = 0;
- }
- }
- }
-
- return 0;
-}
diff --git a/modules/drassil/mysql-tools/mysql-config.dist b/modules/drassil/mysql-tools/mysql-config.dist
deleted file mode 100644
index ca71fc41ea..0000000000
--- a/modules/drassil/mysql-tools/mysql-config.dist
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-#
-# * Copyright (C) 2007 - 2015 Hyperweb2 All rights reserved.
-# * GNU General Public License version 3; see www.hyperweb2.com/terms/
-#
-# This file contains login/password information for accessing the MySQL database
-# and is used by all the mysql_* scripts.
-#
-
-#
-# MYSQL
-#
-
-# change these lines with your mysql config
-MYSQL_DB=test
-MYSQL_USER=usr
-MYSQL_PASS=pwd
-MYSQL_HOST=localhost
-#MYSQL_SOCK=/var/lib/mysql/mysql.sock
-
-#
-# File Options
-#
-
-# path of directory where extract separated tables ( without end slash )
-TPATH=./tables
-
-# (boolean) clean directory before dump, in this way non-existant db tables will be deleted
-CLEANFOLDER=1
-
-# path of file to extract database full dump
-FPATH=./full/full.sql
-
-# (boolean) switch to enable(1)/disable(0) the dump/import of full db file
-# ( you can do it manually using command parameters )
-FULL=0
-
-# (boolean) set 1 to enable --tab option for mysqldump and import data from it
-# it's very fast import/export process but doesn't utilize the insert query
-# NOTE: full db continue to be dumped with normal sql format
-# NOTE2: if you have problem with permissions ( mysql errorcode:13) mostly in linux
-# you should enable CHMODE config and disable/edit
-# some protections such as AppArmor in Ubuntu or SELinux in Fedora..
-
-TEXTDUMPS=1
-
-# (boolean) allow to change "TPATH" folder permissions to enable mysql server writing
-
-CHMODE=0
-
-
-#
-# TOOLS OPTIONS
-#
-
-#number of threads you want to use in TEXT import mode ( you can safely set it to your number of processor increasing process speed )
-THREADS=1
-
-IMPORTOPTS_TEXT="--use-threads=$THREADS --local --compress --delete --lock-tables"
-
-DUMPOPTS="--skip-comments --skip-set-charset --extended-insert --order-by-primary --single-transaction --quick"
-
diff --git a/modules/drassil/mysql-tools/mysql-dump b/modules/drassil/mysql-tools/mysql-dump
deleted file mode 100644
index 33e5e35aca..0000000000
--- a/modules/drassil/mysql-tools/mysql-dump
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/bash
-#
-# * Copyright (C) 2007 - 2015 Hyperweb2 All rights reserved.
-# * GNU General Public License version 3; see www.hyperweb2.com/terms/
-
-echo "starting dump process.."
-# check config from same folder and include only if exists
-CONF_FILE=$MT_DIR"/mysql-config"
-if [ -f "$CONF_FILE" ]; then
- source "$CONF_FILE"
-fi;
-
-#overwrite configs if file exists and variables are defined
-if [ ! -z "$4" ]; then
- if [ -e "$4" ]; then
- source "$4"
- else # if 4th parameter is not a file, then try to eval
- eval "$4"
- fi;
-fi;
-
-source $MT_DIR"/shared-def"
-
-if [ ! -z "$1" ]; then
- MYSQL_DB=$1;
-fi
-
-#change group instead mod
-#group=`ls -l tables | awk '{print $4}'`
-#if [ $group != "mysql" ]; then
-# if (($CHMODE != 0)); then
-# sudo chgrp -v mysql $TPATH
-# fi
-#fi
-
-#change permissions for other users
-if [ ! -z $TPATH ]; then
- if [ ! -d "$TPATH" ]; then
- #create the path recursively
- echo "creating dir: $TPATH.."
- mkdir -p "$TPATH"
- fi
-
- if (($CHMODE != 0)); then
- echo "changing permissions.."
- sudo chmod -v o=rwx $TPATH
- fi
-
- #clean old tables
- if (($CLEANFOLDER != 0)); then
- rm -rvf $TPATH/*
- fi
-
- if [ ! -z "$2" ]; then
- #if tables are specified in parameters then..
- arr=$(echo $2 | tr "," "\n")
-
- for T in $arr
- do
- echo "exporting "$T;
- if (($TEXTDUMPS != 1)); then
- FILE="$TPATH/$T.sql"
- if [ -f $FILE ]; then
- rm -f $FILE
- fi
-
- if (($PARSEDUMP != 0)); then
- echo "Parsing enabled";
- eval "$MYSQLDUMP$OPTS $DUMPOPTS '$MYSQL_DB' '$T' | $DUMPPARSER > $FILE"
- else
- eval "$MYSQLDUMP$OPTS $DUMPOPTS '$MYSQL_DB' '$T' -r $FILE"
- fi
- else
- echo $(eval "$MYSQLDUMP$OPTS $DUMPOPTS --tab=$TPATH/ '$MYSQL_DB' '$T'")
- fi
- done
-
- else
- #else get all tables from selected db
- CMD="$MYSQL$OPTS -N -B -e 'show tables from \`$MYSQL_DB\`'"
- echo "command: "$CMD
- for T in $(eval $CMD)
- do
- if (($TEXTDUMPS != 1)); then
- echo "exporting "$T;
- FILE="$TPATH/$T.sql"
- if [ -f $FILE ]; then
- rm -f $FILE
- fi
-
- if (($PARSEDUMP != 0)); then
- echo "Parsing enabled on file "$FILE;
- eval "$MYSQLDUMP$OPTS $DUMPOPTS '$MYSQL_DB' '$T' | $DUMPPARSER > $FILE"
- else
- eval "$MYSQLDUMP$OPTS $DUMPOPTS '$MYSQL_DB' '$T' -r $FILE"
- fi
- else
- echo "exporting "$MYSQL_DB" tables: "$T;
- echo $(eval "$MYSQLDUMP$OPTS $DUMPOPTS --tab=$TPATH/ '$MYSQL_DB' '$T'")
- fi
- done;
-
- fi
-fi
-
-if [ ! -z "$3" ]; then FULL=$3; fi
-# export full file if option is enabled
-if (($FULL != 0)); then
- echo 'exporting FULL '$MYSQL_DB' in single file';
- rm -f $FPATH
-
- if (($PARSEDUMP != 0)); then
- echo "Parsing enabled";
- eval "$MYSQLDUMP$OPTS $DUMPOPTS '$MYSQL_DB' | $DUMPPARSER > $FPATH"
- else
- eval "$MYSQLDUMP$OPTS $DUMPOPTS '$MYSQL_DB' -r $FPATH"
- fi
-fi
-
diff --git a/modules/drassil/mysql-tools/mysql-import b/modules/drassil/mysql-tools/mysql-import
deleted file mode 100644
index ad05e1bd05..0000000000
--- a/modules/drassil/mysql-tools/mysql-import
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/bin/bash
-#
-# * Copyright (C) 2007 - 2015 Hyperweb2 All rights reserved.
-# * GNU General Public License version 3; see www.hyperweb2.com/terms/
-
-echo "starting import process.."
-# check config from same folder and include only if exists
-CONF_FILE=$MT_DIR"/mysql-config"
-if [ -f "$CONF_FILE" ]; then
- source "$CONF_FILE"
-fi;
-
-#overwrite configs if file exists and variables are defined
-if [ ! -z "$4" ]; then
- if [ -e "$4" ]; then
- source "$4"
- else # if 4th parameter is not a file, then try to eval
- eval "$4"
- fi;
-fi;
-
-source $MT_DIR"/shared-def"
-
-if [ ! -z "$1" ]; then
- MYSQL_DB=$1;
-fi
-
-# Table prefix ( to implement )
-PFX=
-
-# par 1 : db_name
-function checkdb {
- # Check if database exists
- err=`echo "quit" | $(eval "$MYSQL$OPTS '$1'") 2>&1`
- if [ $? != 0 ]; then
- if echo "$err" | grep -q "Access denied"; then
- echo -e "\nDATABASE $1 EXISTS BUT USER $MYSQL_USER DOES NOT HAVE ACCESS TO IT, ABORTING"
- exit
- fi
- echo -n "[creating $1]"
- if ! echo "CREATE DATABASE $1;" | $(eval "$MYSQL$OPTS" ) 2>/dev/null ; then
- echo -e "\nDATABASE $1 DOES NOT EXIST AND I FAILED TO CREATE IT, ABORTING"
- exit
- fi
- fi
-}
-
-#par1: is_text_file ; par2: file
-function import
-{
- echo "Importing $2 into $MYSQL_DB (text: $1) ..."
-
- SQL="SET FOREIGN_KEY_CHECKS = 0;"
- #eval "$MYSQL$OPTS -e \"SET FOREIGN_KEY_CHECKS = 0\" '$MYSQL_DB'" #disable foreign check
-
- FILE=$2
- if (($1 != 0)); then
- #eval "$MYSQLIMPORT$OPTS $IMPORTOPTS_TEXT '$MYSQL_DB' $2"
- TABLE=${FILE##*/}
- TABLE=${TABLE%.txt}
- SQL+="LOAD DATA LOCAL INFILE '$2' INTO TABLE $MYSQL_DB.$TABLE;"
- else
- #eval "$MYSQL$OPTS '$MYSQL_DB'" < "$2"
- SQL+="SOURCE $2;"
- fi
- #eval "$MYSQL$OPTS -e \"SET FOREIGN_KEY_CHECKS = 1\" '$MYSQL_DB'" #enable foreign check
- SQL+="SET FOREIGN_KEY_CHECKS = 1";
-
- eval "$MYSQL$OPTS -e \"$SQL\" '$MYSQL_DB'"
-
- echo " done"
-}
-
-if [ ! -z "$1" ]; then
- DB=$1;
-fi
-
-checkdb $MYSQL_DB
-
-if [ ! -z "$2" ]; then
- tables=$(echo $2 | tr "," "\n")
-fi
-if [ ! -z "$3" ]; then
- FULL=$3;
-fi
-
-if (($FULL != 0)); then
- echo "importing full world file"
- $(eval "$MYSQL$OPTS '$MYSQL_DB'") < $FPATH
-else
- if [ ! -z "$2" ]; then
- import "0" "$TPATH/$2.sql" # TODO we should check if it's a set of tables before
- if (($TEXTDUMPS != 0)); then
- for x in $TPATH/*.txt; do
- import "1" "$x"
- done
- fi
- else
- for x in $TPATH/*.sql; do
- import "0" "$x"
- done
-
- if (($TEXTDUMPS != 0)); then
- for x in $TPATH/*.txt; do
- import "1" "$x"
- done
- fi
- fi
-fi
diff --git a/modules/drassil/mysql-tools/mysql-tools b/modules/drassil/mysql-tools/mysql-tools
deleted file mode 100644
index 6f2fad77c6..0000000000
--- a/modules/drassil/mysql-tools/mysql-tools
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-#
-# * Copyright (C) 2007 - 2015 Hyperweb2 All rights reserved.
-# * GNU General Public License version 3; see www.hyperweb2.com/terms/
-
-MT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-function main {
- if [ ! -z "$1" ]; then
- if [ "$1" == "dump" ]; then
- source $MT_DIR"/mysql-dump" "$3" "$2" "$4" "$5"
- return
- elif [ "$1" == "import" ]; then
- source $MT_DIR"/mysql-import" "$3" "$2" "$4" "$5"
- return
- fi
- else
- echo "!!no command specified!!"
- fi
-}
-
-# OPT - Tables - database - full file - config path
-main "$1" "$2" "$3" "$4" "$5"
diff --git a/modules/drassil/mysql-tools/shared-def b/modules/drassil/mysql-tools/shared-def
deleted file mode 100644
index 6742fcf3b8..0000000000
--- a/modules/drassil/mysql-tools/shared-def
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-#
-# * Copyright (C) 2007 - 2015 Hyperweb2 All rights reserved.
-# * GNU General Public License version 3; see www.hyperweb2.com/terms/
-
-MYSQL="mysql"
-MYSQLIMPORT="mysqlimport"
-MYSQLDUMP="mysqldump"
-DUMPPARSER=$MT_DIR"/bin/dump-parser"
-
-#empty for bash commands
-WIN_BIN=0
-command -v mysql >/dev/null 2>&1 || { WIN_BIN=1; }
-command -v mysqlimport >/dev/null 2>&1 || { WIN_BIN=1; }
-command -v mysqldump >/dev/null 2>&1 || { WIN_BIN=1; }
-
-WIN_BIN=1
-if [ `uname -s` == "Linux" ]; then
- WIN_BIN=0
-else
- WIN_BIN=1
-fi;
-
-if (($WIN_BIN != 0)); then
- MYSQL=$MT_DIR"/bin/$MYSQL"
- MYSQLIMPORT=$MT_DIR"/bin/$MYSQLIMPORT"
- MYSQLDUMP=$MT_DIR"/bin/$MYSQLDUMP"
-fi;
-
-OPTS=
-[ ! -z "$MYSQL_USER" ] && OPTS+=" -u $MYSQL_USER"
-[ ! -z "$MYSQL_PASS" ] && OPTS+=" -p$MYSQL_PASS"
-[ ! -z "$MYSQL_HOST" ] && OPTS+=" -h $MYSQL_HOST"
-[ ! -z "$MYSQL_SOCK" ] && OPTS+=" -S $MYSQL_SOCK"