first commit

This commit is contained in:
2025-08-02 16:30:27 +02:00
commit 23646bfcee
14851 changed files with 1750626 additions and 0 deletions

22
bin/import_db.sh Normal file
View File

@@ -0,0 +1,22 @@
#!/bin/bash -xe
if [ "$#" == 0 ]; then
DUMP_BRANCH=${BRANCH}
else
DUMP_BRANCH=$1
fi
cd "$5"
export GITLAB_TOKEN=Pej7sZt-kvyD9xo94tTC
DUMP_BRANCH=$(php -r "echo urlencode(\"$DUMP_BRANCH\");")
curl -# -L -f --header "PRIVATE-TOKEN: ${GITLAB_TOKEN}" "https://gitlab.wpj.cz/api/v4/projects/2/jobs/artifacts/${DUMP_BRANCH}/download?job=dump-database" > data.zip
unzip -o data.zip
# Import database
bunzip2 -c database.sql.bz2 | mysql.php
rm data.zip database.sql.bz2