<commit_before>#!/bin/bash

echo "Installing Tomcat 7"
apt-get install tomcat7

echo "Configuring Tomcat"

mkdir backup
mkdir backup/etc
mkdir backup/etc/tomcat7
mkdir backup/etc/default
#backup default tomcat web.xml
cp /etc/tomcat7/web.xml backup/etc/tomcat7/web.xml-orig-backup
#copy our web.xml to tomcat directory
cp etc/tomcat7/web.xml /etc/tomcat7/

#backup default server.xml
cp /etc/tomcat7/server.xml backup/etc/tomcat7/server.xml-orig-backup
#copy our server.xml to tomcat dir
cp etc/tomcat7/server.xml /etc/tomcat7/

#backup default catalina.properties
cp /etc/tomcat7/catalina.properties backup/etc/tomcat7/catalina.properties-orig-backup
#copy our catalina properties
cp etc/tomcat7/catalina.properties /etc/tomcat7/

echo "Installing Railo Java Agent into Tomcat"
echo $'\nJAVA_OPTS="${JAVA_OPTS} -javaagent:/opt/railo/current/railo-inst.jar"' >> /etc/default/tomcat7

echo "Installing mod_cfml Valve for Automatic Virtual Host Configuration"
curl -o /opt/railo/current/mod_cfml-valve_v1.0.14.jar http://download.modcfml.org/downloader.cfm/id/24/file/mod_cfml-valve_v1.0.14.jar

echo "Setting Permissions on Railo Folders"
chown -R tomcat7:tomcat7 /opt/railo
chmod -R 750 /opt/railo

echo "Setting JVM Max Heap Size to " $JVM_MAX_HEAP_SIZE
cp /etc/default/tomcat7 backup/etc/default/tomcat7
sed -e "s/-Xmx128m/-Xmx$JVM_MAX_HEAP_SIZE/g" /etc/default/tomcat7 >> /etc/default/tomcat7<commit_msg>Allow local copy of mod_cfml jar<commit_after>#!/bin/bash

echo "Installing Tomcat 7"
apt-get install tomcat7

echo "Configuring Tomcat"

mkdir backup
mkdir backup/etc
mkdir backup/etc/tomcat7
mkdir backup/etc/default
#backup default tomcat web.xml
cp /etc/tomcat7/web.xml backup/etc/tomcat7/web.xml-orig-backup
#copy our web.xml to tomcat directory
cp etc/tomcat7/web.xml /etc/tomcat7/

#backup default server.xml
cp /etc/tomcat7/server.xml backup/etc/tomcat7/server.xml-orig-backup
#copy our server.xml to tomcat dir
cp etc/tomcat7/server.xml /etc/tomcat7/

#backup default catalina.properties
cp /etc/tomcat7/catalina.properties backup/etc/tomcat7/catalina.properties-orig-backup
#copy our catalina properties
cp etc/tomcat7/catalina.properties /etc/tomcat7/

cp /etc/default/tomcat7 backup/etc/default/tomcat7

echo "Installing Railo Java Agent into Tomcat"
echo $'\nJAVA_OPTS="${JAVA_OPTS} -javaagent:/opt/railo/current/railo-inst.jar"' >> /etc/default/tomcat7

echo "Installing mod_cfml Valve for Automatic Virtual Host Configuration"
if [ -f lib/mod_cfml-valve_v1.0.14.jar ]; then
  cp lib/mod_cfml-valve_v1.0.14.jar /opt/railo/current/
else
  curl -o /opt/railo/current/mod_cfml-valve_v1.0.14.jar http://download.modcfml.org/downloader.cfm/id/24/file/mod_cfml-valve_v1.0.14.jar
fi
   
echo "Setting Permissions on Railo Folders"
chown -R tomcat7:tomcat7 /opt/railo
chmod -R 750 /opt/railo

echo "Setting JVM Max Heap Size to " $JVM_MAX_HEAP_SIZE

sed -e "s/-Xmx128m/-Xmx$JVM_MAX_HEAP_SIZE/g" /etc/default/tomcat7 >> /etc/default/tomcat7
{'fraction_non_alphanumeric': 0.1158929176550322, 'fraction_numerical': 0.02846492714334124, 'mean_word_length': 4.517757009345795, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 20}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '621107', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1118, 'n_words': 247}