-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_import_dump.sh
More file actions
executable file
·67 lines (49 loc) · 1.59 KB
/
_import_dump.sh
File metadata and controls
executable file
·67 lines (49 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
GAME_ID=${1:-"som"}
source ./_common.sh
log_info "Starting process for Game ID: ${YELLOW}$GAME_ID${NC}"
case $GAME_ID in
"ffmq" | "gaia")
DUMP_DIR="$RESOURCE_PATH/dump_text"
SOURCE_FILE="$DUMP_DIR/dump_eng.txt"
check_file "$SOURCE_FILE"
log_step "Importing $SOURCE_FILE"
python -m brainlordutils.utils import_dump \
-db "$DB" -s "$SOURCE_FILE"
;;
"soe")
DUMP_DIR="$RESOURCE_PATH/dump_text"
SOURCE_FILE="$DUMP_DIR/dump_eng.txt"
check_file "$SOURCE_FILE"
log_step "Importing $SOURCE_FILE"
python -m brainlordutils.utils import_dump \
-db "$DB" -s "$SOURCE_FILE" -g "$GAME_ID"
;;
"som")
DUMP_DIR="$RESOURCE_PATH/dump_text"
SOURCE_EVENTS_FILE="$DUMP_DIR/dump_events_eng.txt"
SOURCE_TEXT_FILE="$DUMP_DIR/dump_texts_eng.txt"
check_file "$SOURCE_EVENTS_FILE"
check_file "$SOURCE_TEXT_FILE"
log_step "Importing $SOURCE_EVENTS_FILE"
python -m brainlordutils.utils import_dump \
-db "$DB" -s "$SOURCE_EVENTS_FILE"
log_step "Importing $SOURCE_TEXT_FILE"
python -m brainlordutils.utils import_dump \
-db "$DB" -s "$SOURCE_TEXT_FILE"
;;
"starocean")
DUMP_DIR="$RESOURCE_PATH/chester/resources"
SOURCE_FILE="$DUMP_DIR/dialogues.txt"
check_file "$SOURCE_FILE"
log_step "Importing dump(s) for $GAME_ID"
python -m brainlordutils.utils import_dump \
-db "$DB" -s "$SOURCE_FILE" -g "$GAME_ID"
;;
*)
log_error "Unknown GAME_ID: $GAME_ID"
exit 1
;;
esac
log_success "All tasks completed successfully!"
log_info "Database location: ${YELLOW}$DB${NC}"