<commit_before>#!/bin/bash

if [[ $# != 0 || $S1 == "-h" || $S1 == "--help" ]]
then
		echo "Usage: "
		echo "  $0"
		exit 1
fi


cd "$(dirname $0)"
# Read config file with paths to WP-installs and usernames
source ../conf

for userName in $userNames
do
	echo "Checking install $userName for minor update..."
	cd $basePath/$userName/wordpress
	if wp core check-update --allow-root | grep "minor"	
	then
		echo ""
		echo "Updating site for user $userName..."
		su - $userName -c "cd $basePath/$userName/wordpress
wp core update --version=$(wp core check-update --allow-root | grep minor | awk {'print $1'})
wp core update-db"
	else
		echo "No minor update found for WP site $userName"
		if wp core check-update --allow-root | grep "major"
		then
			echo ""
			echo "MAJOR UPDATE AVAILABLE FOR $userName"
		fi
	fi

	# Update all plugins as well
	echo "Updating plugins for $userName"
	su - $userName -c "cd $basePath/$userName/wordpress
wp plugin update --all"

	echo ""
done

<commit_msg>Updates WP-themes as well as plugins and core<commit_after>#!/bin/bash

if [[ $# != 0 || $S1 == "-h" || $S1 == "--help" ]]
then
		echo "Usage: "
		echo "  $0"
		exit 1
fi


cd "$(dirname $0)"
# Read config file with paths to WP-installs and usernames
source ../conf

for userName in $userNames
do
	echo "Checking install $userName for minor update..."
	cd $basePath/$userName/wordpress
	if wp core check-update --allow-root | grep "minor"	
	then
		echo ""
		echo "Updating site for user $userName..."
		su - $userName -c "cd $basePath/$userName/wordpress
wp core update --version=$(wp core check-update --allow-root | grep minor | awk {'print $1'})
wp core update-db"
	else
		echo "No minor update found for WP site $userName"
		if wp core check-update --allow-root | grep "major"
		then
			echo ""
			echo "MAJOR UPDATE AVAILABLE FOR $userName"
		fi
	fi

	# Update all plugins as well
	echo "Updating plugins for $userName"
	su - $userName -c "cd $basePath/$userName/wordpress
wp plugin update --all"
	
	
	# Update all plugins as well
	echo "Updating themes for $userName"
	su - $userName -c "cd $basePath/$userName/wordpress
wp theme update --all"
	
	echo ""
done


{'fraction_non_alphanumeric': 0.13190896423594983, 'fraction_numerical': 0.006502554575011612, 'mean_word_length': 3.20703125, 'pattern_counts': {'":': 0, '<': 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': '2601985', 'n_tokens_mistral': 796, 'n_tokens_neox': 726, 'n_words': 278}