summaryrefslogtreecommitdiff
path: root/apps/installer
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2018-07-17 13:54:23 +0200
committerYehonal <yehonal.azeroth@gmail.com>2018-07-17 13:54:23 +0200
commitaf5256cd5b777e5db398bb9e1e4941893a5a06e4 (patch)
tree8ded8f5440eaa427601e8d24a540fd318d7e0ff8 /apps/installer
parent113ac069295f3de20ccbb5132f1e9b9448ae7341 (diff)
Various fixes to acore dashboard
+ simple restarter now prevents infinite crash loops + client data downloader now uses github releases and fixed downloading path + module updating now take care about compatibility version info + disabled CONFDIR variable in bash conf file, using BINPATH by default instead
Diffstat (limited to 'apps/installer')
-rw-r--r--apps/installer/includes/functions.sh29
1 files changed, 16 insertions, 13 deletions
diff --git a/apps/installer/includes/functions.sh b/apps/installer/includes/functions.sh
index 987fe5e3c8..31284aa197 100644
--- a/apps/installer/includes/functions.sh
+++ b/apps/installer/includes/functions.sh
@@ -48,7 +48,7 @@ function inst_allInOne() {
inst_configureOS
inst_updateRepo
inst_compile
- inst_assembleDb
+ dbasm_import true true true
}
function inst_getVersionBranch() {
@@ -107,7 +107,7 @@ function inst_module_search {
read v b < <(inst_getVersionBranch "https://raw.githubusercontent.com/azerothcore/$mod/master/acore-module.json")
if [[ "$b" != "none" ]]; then
- echo "-> $mod (tested with AC v$v)"
+ echo "-> $mod (tested with AC version: $v)"
else
echo "-> $mod (no revision available for AC v$AC_VERSION, it could not work!)"
fi
@@ -154,10 +154,16 @@ function inst_module_update {
_tmp=$PWD
if [ -d "$J_PATH_MODULES/$res/" ]; then
+ read v b < <(inst_getVersionBranch "https://raw.githubusercontent.com/azerothcore/$res/master/acore-module.json")
+
cd "$J_PATH_MODULES/$res/"
- branch=`git rev-parse --abbrev-ref HEAD`
- Joiner:upd_repo "https://github.com/azerothcore/$res" "$res" "$branch" && echo "Done, please re-run compiling and db assembly" || echo "Cannot update"
+ # use current branch if something wrong with json
+ if [[ "$v" == "none" || "$v" == "not-defined" ]]; then
+ b=`git rev-parse --abbrev-ref HEAD`
+ fi
+
+ Joiner:upd_repo "https://github.com/azerothcore/$res" "$res" "$b" && echo "Done, please re-run compiling and db assembly" || echo "Cannot update"
cd $_tmp
else
echo "Cannot update! Path doesn't exist"
@@ -184,16 +190,13 @@ function inst_module_remove {
function inst_simple_restarter {
echo "Running $1 in background..."
- bash "$AC_PATH_APPS/startup-scripts/simple-restarter" "$BINPATH" "$1" &
+ bash "$AC_PATH_APPS/startup-scripts/simple-restarter" "$AC_BINPATH_FULL" "$1" &
}
function inst_download_client_data {
- path="$BINPATH/data"
- if [ -e "$path/.git/" ]; then
- # if exists , update
- git --git-dir="$path/.git/" rev-parse && git --git-dir="$path/.git/" pull origin master | grep 'Already up-to-date.' && changed="no"
- else
- # otherwise clone
- git clone "https://github.com/wowgaming/client-data" -c advice.detachedHead=0 -b master --depth=1 $path
- fi
+ local path="$AC_BINPATH_FULL"
+
+ echo "Downloading client data in: $path/data.zip ..."
+ curl -L https://github.com/wowgaming/client-data/releases/download/v4/data.zip > "$path/data.zip" \
+ && unzip -o "$path/data.zip" -d "$path/" && rm "$path/data.zip"
} \ No newline at end of file