mirror of
https://github.com/nikdoof/dropbot.git
synced 2025-12-19 20:59:24 +00:00
25
sde_update.sh
Normal file
25
sde_update.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
SDE_URL="https://www.fuzzwork.co.uk/dump/sqlite-latest.sqlite.bz2"
|
||||
|
||||
echo "Downloading SDE from ${SDE_URL}"
|
||||
curl -o sde.sqlite.bz2 "${SDE_URL}" && bunzip2 sde.sqlite.bz2
|
||||
if [ -e sde.sqlite ]; then
|
||||
echo "Generating reference data"
|
||||
/usr/bin/env python gen_reference_data.py sde.sqlite
|
||||
cp *.json dropbot/data/
|
||||
|
||||
echo "Running unit tests"
|
||||
/usr/bin/env python setup.py test > /dev/null 2>&1
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
git add dropbox/data/*.json
|
||||
git status
|
||||
echo "SDE data updated successfully"
|
||||
else
|
||||
echo "Unit tests failed, please investigate"
|
||||
fi
|
||||
else
|
||||
echo "Error downloading SDE"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user