<commit_before>#!/bin/bash

REVISION=25


# module path given & rsync transfer a success?
[ -z "$RSYNC_MODULE_PATH" ] && exit
[ "$RSYNC_EXIT_STATUS" -ne 0 ] && exit

# only rotate if /000 directory exists
[ ! -d "$RSYNC_MODULE_PATH/000" ] && exit

REVISIONPAD=`printf %03d $REVISION`
if [ -d "$RSYNC_MODULE_PATH/$REVISIONPAD" ]; then
	# drop the oldest backup directory, outside revision range
	chmod -R u+w "$RSYNC_MODULE_PATH/$REVISIONPAD"
	rm -rf "$RSYNC_MODULE_PATH/$REVISIONPAD"
fi

while [ $REVISION -gt 0 ]; do
	REVISION=$((REVISION - 1))
	REVISIONPAD=`printf %03d $REVISION`

	if [ -d "$RSYNC_MODULE_PATH/$REVISIONPAD" ]; then
		REVISIONNEXTPAD=`printf %03d $((REVISION + 1))`
		mv "$RSYNC_MODULE_PATH/$REVISIONPAD" "$RSYNC_MODULE_PATH/$REVISIONNEXTPAD"
	fi
done<commit_msg>Tweaked some bash variable names<commit_after>#!/bin/bash

REVISION_COUNT=25


# module path given & rsync transfer a success?
[ -z "$RSYNC_MODULE_PATH" ] && exit
[ "$RSYNC_EXIT_STATUS" -ne 0 ] && exit

# only rotate if /000 directory exists
[ ! -d "$RSYNC_MODULE_PATH/000" ] && exit

revisionPad=`printf %03d $REVISION_COUNT`
if [ -d "$RSYNC_MODULE_PATH/$revisionPad" ]; then
	# drop the oldest backup directory, outside revision range
	chmod -R u+w "$RSYNC_MODULE_PATH/$revisionPad"
	rm -rf "$RSYNC_MODULE_PATH/$revisionPad"
fi

revision=$REVISION_COUNT
while [ $revision -gt 0 ]; do
	revision=$((revision - 1))
	revisionPad=`printf %03d $revision`

	if [ -d "$RSYNC_MODULE_PATH/$revisionPad" ]; then
		revisionNextPad=`printf %03d $((revision + 1))`
		mv "$RSYNC_MODULE_PATH/$revisionPad" "$RSYNC_MODULE_PATH/$revisionNextPad"
	fi
done
{'fraction_non_alphanumeric': 0.1419753086419753, 'fraction_numerical': 0.022222222222222223, 'mean_word_length': 5.140151515151516, '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': '763695', 'n_tokens_mistral': 662, 'n_tokens_neox': 627, 'n_words': 146}