mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(apps/scripts): Add quotes for directory paths containing empty spaces (#3716)
This commit is contained in:
@@ -15,9 +15,9 @@ fi
|
|||||||
|
|
||||||
for entry in "$AC_PATH_MODULES/"*/include.sh
|
for entry in "$AC_PATH_MODULES/"*/include.sh
|
||||||
do
|
do
|
||||||
if [ -e $entry ]; then
|
if [ -e "$entry" ]; then
|
||||||
source $entry
|
source "$entry"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
ACORE_VERSION=$("$AC_PATH_DEPS/jsonpath/JSONPath.sh" -f $AC_PATH_ROOT/acore.json -b '$.version')
|
ACORE_VERSION=$("$AC_PATH_DEPS/jsonpath/JSONPath.sh" -f "$AC_PATH_ROOT/acore.json" -b '$.version')
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ function dbasm_assemble() {
|
|||||||
shopt -s globstar
|
shopt -s globstar
|
||||||
|
|
||||||
if [ $with_base = true ]; then
|
if [ $with_base = true ]; then
|
||||||
echo "" > $OUTPUT_FOLDER$database$suffix_base".sql"
|
echo "" > "$OUTPUT_FOLDER$database$suffix_base.sql"
|
||||||
|
|
||||||
|
|
||||||
if [ ! ${#base[@]} -eq 0 ]; then
|
if [ ! ${#base[@]} -eq 0 ]; then
|
||||||
@@ -154,11 +154,11 @@ function dbasm_assemble() {
|
|||||||
for d in "${base[@]}"
|
for d in "${base[@]}"
|
||||||
do
|
do
|
||||||
echo "Searching on $d ..."
|
echo "Searching on $d ..."
|
||||||
if [ ! -z $d ]; then
|
if [ ! -z "$d" ]; then
|
||||||
for entry in "$d"/**/*.sql
|
for entry in "$d"/**/*.sql
|
||||||
do
|
do
|
||||||
if [[ -e $entry ]]; then
|
if [[ -e $entry ]]; then
|
||||||
cat "$entry" >> $OUTPUT_FOLDER$database$suffix_base".sql"
|
cat "$entry" >> "$OUTPUT_FOLDER$database$suffix_base.sql"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -167,9 +167,9 @@ function dbasm_assemble() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $with_updates = true ]; then
|
if [ $with_updates = true ]; then
|
||||||
updFile=$OUTPUT_FOLDER$database$suffix_upd".sql"
|
updFile="$OUTPUT_FOLDER$database$suffix_upd.sql"
|
||||||
|
|
||||||
echo "" > $updFile
|
echo "" > "$updFile"
|
||||||
|
|
||||||
if [ ! ${#updates[@]} -eq 0 ]; then
|
if [ ! ${#updates[@]} -eq 0 ]; then
|
||||||
echo "Generating $OUTPUT_FOLDER$database$suffix_upd ..."
|
echo "Generating $OUTPUT_FOLDER$database$suffix_upd ..."
|
||||||
@@ -177,15 +177,15 @@ function dbasm_assemble() {
|
|||||||
for d in "${updates[@]}"
|
for d in "${updates[@]}"
|
||||||
do
|
do
|
||||||
echo "Searching on $d ..."
|
echo "Searching on $d ..."
|
||||||
if [ ! -z $d ]; then
|
if [ ! -z "$d" ]; then
|
||||||
for entry in "$d"/**/*.sql
|
for entry in "$d"/**/*.sql
|
||||||
do
|
do
|
||||||
if [[ ! -e $entry ]]; then
|
if [[ ! -e $entry ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "-- $file" >> $updFile
|
echo "-- $file" >> "$updFile"
|
||||||
cat "$entry" >> $updFile
|
cat "$entry" >> "$updFile"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -193,9 +193,9 @@ function dbasm_assemble() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $with_custom = true ]; then
|
if [ $with_custom = true ]; then
|
||||||
custFile=$OUTPUT_FOLDER$database$suffix_custom".sql"
|
custFile="$OUTPUT_FOLDER$database$suffix_custom.sql"
|
||||||
|
|
||||||
echo "" > $custFile
|
echo "" > "$custFile"
|
||||||
|
|
||||||
if [ ! ${#custom[@]} -eq 0 ]; then
|
if [ ! ${#custom[@]} -eq 0 ]; then
|
||||||
echo "Generating $OUTPUT_FOLDER$database$suffix_custom ..."
|
echo "Generating $OUTPUT_FOLDER$database$suffix_custom ..."
|
||||||
@@ -203,15 +203,15 @@ function dbasm_assemble() {
|
|||||||
for d in "${custom[@]}"
|
for d in "${custom[@]}"
|
||||||
do
|
do
|
||||||
echo "Searching on $d ..."
|
echo "Searching on $d ..."
|
||||||
if [ ! -z $d ]; then
|
if [ ! -z "$d" ]; then
|
||||||
for entry in "$d"/**/*.sql
|
for entry in "$d"/**/*.sql
|
||||||
do
|
do
|
||||||
if [[ ! -e $entry ]]; then
|
if [[ ! -e $entry ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "-- $file" >> $custFile
|
echo "-- $file" >> "$custFile"
|
||||||
cat "$entry" >> $custFile
|
cat "$entry" >> "$custFile"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
24
conf/dist/config.sh
vendored
24
conf/dist/config.sh
vendored
@@ -98,44 +98,44 @@ BACKUP_FOLDER="$AC_PATH_ROOT/env/dist/sql/backup/"
|
|||||||
|
|
||||||
# FULL DB
|
# FULL DB
|
||||||
DB_AUTH_PATHS=(
|
DB_AUTH_PATHS=(
|
||||||
$SRCPATH"/data/sql/base/db_auth/"
|
"$SRCPATH/data/sql/base/db_auth/"
|
||||||
)
|
)
|
||||||
|
|
||||||
DB_CHARACTERS_PATHS=(
|
DB_CHARACTERS_PATHS=(
|
||||||
$SRCPATH"/data/sql/base/db_characters"
|
"$SRCPATH/data/sql/base/db_characters"
|
||||||
)
|
)
|
||||||
|
|
||||||
DB_WORLD_PATHS=(
|
DB_WORLD_PATHS=(
|
||||||
$SRCPATH"/data/sql/base/db_world/"
|
"$SRCPATH/data/sql/base/db_world/"
|
||||||
)
|
)
|
||||||
|
|
||||||
# UPDATES
|
# UPDATES
|
||||||
DB_AUTH_UPDATES_PATHS=(
|
DB_AUTH_UPDATES_PATHS=(
|
||||||
$SRCPATH"/data/sql/updates/db_auth/"
|
"$SRCPATH/data/sql/updates/db_auth/"
|
||||||
$SRCPATH"/data/sql/updates/pending_db_auth/"
|
"$SRCPATH/data/sql/updates/pending_db_auth/"
|
||||||
)
|
)
|
||||||
|
|
||||||
DB_CHARACTERS_UPDATES_PATHS=(
|
DB_CHARACTERS_UPDATES_PATHS=(
|
||||||
$SRCPATH"/data/sql/updates/db_characters/"
|
"$SRCPATH/data/sql/updates/db_characters/"
|
||||||
$SRCPATH"/data/sql/updates/pending_db_characters/"
|
"$SRCPATH/data/sql/updates/pending_db_characters/"
|
||||||
)
|
)
|
||||||
|
|
||||||
DB_WORLD_UPDATES_PATHS=(
|
DB_WORLD_UPDATES_PATHS=(
|
||||||
$SRCPATH"/data/sql/updates/db_world/"
|
"$SRCPATH/data/sql/updates/db_world/"
|
||||||
$SRCPATH"/data/sql/updates/pending_db_world/"
|
"$SRCPATH/data/sql/updates/pending_db_world/"
|
||||||
)
|
)
|
||||||
|
|
||||||
# CUSTOM
|
# CUSTOM
|
||||||
DB_AUTH_CUSTOM_PATHS=(
|
DB_AUTH_CUSTOM_PATHS=(
|
||||||
$SRCPATH"/data/sql/custom/db_auth/"
|
"$SRCPATH/data/sql/custom/db_auth/"
|
||||||
)
|
)
|
||||||
|
|
||||||
DB_CHARACTERS_CUSTOM_PATHS=(
|
DB_CHARACTERS_CUSTOM_PATHS=(
|
||||||
$SRCPATH"/data/sql/custom/db_characters/"
|
"$SRCPATH/data/sql/custom/db_characters/"
|
||||||
)
|
)
|
||||||
|
|
||||||
DB_WORLD_CUSTOM_PATHS=(
|
DB_WORLD_CUSTOM_PATHS=(
|
||||||
$SRCPATH"/data/sql/custom/db_world/"
|
"$SRCPATH/data/sql/custom/db_world/"
|
||||||
)
|
)
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
|
|||||||
Reference in New Issue
Block a user