-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·35 lines (26 loc) · 780 Bytes
/
Copy pathsetup.sh
File metadata and controls
executable file
·35 lines (26 loc) · 780 Bytes
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
#!/bin/bash
# Check for data directory and required files
echo "Checking data folder and required files..."
DATA_DIR="data"
PATTERNS_FILE="$DATA_DIR/HI-Small_Patterns.txt"
TRANS_FILE="$DATA_DIR/HI-Small_Trans.csv"
if [ ! -d "$DATA_DIR" ]; then
echo "Error: '$DATA_DIR' folder is missing."
exit 1
fi
if [ ! -f "$PATTERNS_FILE" ]; then
echo "Error: Required file '$PATTERNS_FILE' is missing."
exit 1
fi
if [ ! -f "$TRANS_FILE" ]; then
echo "Error: Required file '$TRANS_FILE' is missing."
exit 1
fi
echo "Data folder and required files found. Continuing setup..."
# Create database schema
echo "Creating database schema..."
sqlite3 DATABASE.db < schema.sql
# Run data extraction
echo "Running data extraction script..."
python extract.py
echo "Setup complete!"