<commit_before>#! /bin/bash

source variables.conf

function buildModule
{
SRC=$ARCHIVE_HOME/regal-import

SYNCER_SRC=$SRC/${MODULE}-sync/target/${MODULE}sync.jar
SYNCER_DEST=$ARCHIVE_HOME/sync/${MODULE}sync.jar
if [ -n "$MODULE" ]
then
	cd $SRC
	mvn install -DskipTests >> $ARCHIVE_HOME/logs/regal-build.log
	cd -
	echo "Generate Module $MODULE, templates can be found in $ARCHIVE_HOME/sync"
	cd $SRC/${MODULE}-sync
	mvn -q -e assembly:assembly -DskipTests >> $ARCHIVE_HOME/logs/regal-build.log
	cd -
	cp $SYNCER_SRC $SYNCER_DEST 
	echo -e "#! /bin/bash" > ${NAMESPACE}Sync.sh.tmpl
	echo -e "" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "source $ARCHIVE_HOME/sync/${NAMESPACE}Variables.conf" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "export LANG=en_US.UTF-8" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "cd \$ARCHIVE_HOME/sync" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "cp .oaitimestamp\$NAMESPACE oaitimestamp\${NAMESPACE}\`date +\"%Y%m%d\"\`" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "java -jar -Xms512m -Xmx512m \${MODULE}sync.jar --mode INIT -list \$ARCHIVE_HOME/sync/pidlist.txt --user \$USER --password \$PASSWORD --dtl \$DOWNLOAD --cache \$ARCHIVE_HOME/\${NAMESPACE}base --oai  \$OAI --set \$SET --timestamp .oaitimestamp\$NAMESPACE --fedoraBase http://\$SERVER:\$TOMCAT_PORT/fedora --host http://\$BACKEND --namespace \$NAMESPACE >> ${NAMESPACE}log\`date +\"%Y%m%d\"\`.txt 2>&1" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "cd -" >> ${NAMESPACE}Sync.sh.tmpl

	mv ${NAMESPACE}Sync.sh.tmpl $ARCHIVE_HOME/sync
	cat $MODULE_CONF variables.conf > $ARCHIVE_HOME/sync/${NAMESPACE}Variables.conf.tmpl
fi
}<commit_msg>perform a checkout $VERSION before building regal-import<commit_after>#! /bin/bash

source variables.conf

function buildModule
{
SRC=$ARCHIVE_HOME/regal-import

SYNCER_SRC=$SRC/${MODULE}-sync/target/${MODULE}sync.jar
SYNCER_DEST=$ARCHIVE_HOME/sync/${MODULE}sync.jar
if [ -n "$MODULE" ]
then
	cd $SRC
	git checkout $VERSION
	mvn install -DskipTests >> $ARCHIVE_HOME/logs/regal-build.log
	cd -
	echo "Generate Module $MODULE, templates can be found in $ARCHIVE_HOME/sync"
	cd $SRC/${MODULE}-sync
	mvn -q -e assembly:assembly -DskipTests >> $ARCHIVE_HOME/logs/regal-build.log
	cd -
	cp $SYNCER_SRC $SYNCER_DEST 
	echo -e "#! /bin/bash" > ${NAMESPACE}Sync.sh.tmpl
	echo -e "" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "source $ARCHIVE_HOME/sync/${NAMESPACE}Variables.conf" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "export LANG=en_US.UTF-8" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "cd \$ARCHIVE_HOME/sync" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "cp .oaitimestamp\$NAMESPACE oaitimestamp\${NAMESPACE}\`date +\"%Y%m%d\"\`" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "java -jar -Xms512m -Xmx512m \${MODULE}sync.jar --mode INIT -list \$ARCHIVE_HOME/sync/pidlist.txt --user \$USER --password \$PASSWORD --dtl \$DOWNLOAD --cache \$ARCHIVE_HOME/\${NAMESPACE}base --oai  \$OAI --set \$SET --timestamp .oaitimestamp\$NAMESPACE --fedoraBase http://\$SERVER:\$TOMCAT_PORT/fedora --host http://\$BACKEND --namespace \$NAMESPACE >> ${NAMESPACE}log\`date +\"%Y%m%d\"\`.txt 2>&1" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "" >> ${NAMESPACE}Sync.sh.tmpl
	echo -e "cd -" >> ${NAMESPACE}Sync.sh.tmpl

	mv ${NAMESPACE}Sync.sh.tmpl $ARCHIVE_HOME/sync
	cat $MODULE_CONF variables.conf > $ARCHIVE_HOME/sync/${NAMESPACE}Variables.conf.tmpl
fi
}
{'fraction_non_alphanumeric': 0.19364811691961775, 'fraction_numerical': 0.00505902192242833, 'mean_word_length': 4.233823529411764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 65, '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': '4287156', 'n_tokens_mistral': 1417, 'n_tokens_neox': 1431, 'n_words': 269}