<commit_before>#!/bin/bash

# Fail if attempting to use a variable which hasn't been set.
set -u;
# Stop on first error.
set -e;

# Tell a Mediawiki instance that it is ready to go.

echo "Granting write permission on images folder.";
sudo chown -R "${USER}":steep "${NEW_DIR}/images";
sudo chmod g+sw -R "${NEW_DIR}/images";

echo "Running Mediawiki's update script (sorts out the database tables).";
php "${NEW_DIR}/maintenance/update.php";    

echo "Refreshing Semantic Data";
php "${EXT_DIR}/SemanticMediaWiki/maintenance/rebuildData.php";<commit_msg>Made mediawiki-update.sh not throw an error when used with the db restore script.<commit_after>#!/bin/bash

# Fail if attempting to use a variable which hasn't been set.
set -u;
# Stop on first error.
set -e;

# Tell a Mediawiki instance that it is ready to go.

echo "Granting write permission on images folder.";
sudo chown -R "${USER}":steep "${NEW_DIR}/images";
sudo chmod g+sw -R "${NEW_DIR}/images";

echo "Running Mediawiki's update script (sorts out the database tables).";
php "${NEW_DIR}/maintenance/update.php";    

echo "Refreshing Semantic Data";
php "${NEW_DIR}/extensions/SemanticMediaWiki/maintenance/rebuildData.php";
{'fraction_non_alphanumeric': 0.12762384550797648, 'fraction_numerical': 0.0, 'mean_word_length': 4.70334928229665, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3280097', 'n_tokens_mistral': 385, 'n_tokens_neox': 371, 'n_words': 141}