<commit_before>#!/bin/bash
# ===========================================
# Install Common Code for Subversion Server
#
# Sets up:
#	Subversion.
# Resources:
# 	https://help.ubuntu.com/community/Subversion
#	https://help.ubuntu.com/community/ApacheHTTPserver
#	https://help.ubuntu.com/community/forum/server/apache2/SSL
#	http://odyniec.net/articles/ubuntu-subversion-server/

# To run script standalone:
# ===========================================

# Some of these things may already be done by a driver script.

echo "Install common code for Subversion (SVN) server. "

# Preparation.

sudo apt-get -y update
sudo apt-get -y upgrade

echo "Installing python support. "
apt-get -y install python-software-properties python-setuptools 


# TODO.
# Install Apache
# Install certificate.

# Download and install Subversion

echo "Installing Subversion. "

sudo apt-get install -y subversion

# Subversion user/group and directory
echo -e "Adding the subversion application user: subversion:$ACCOUNT_PASSWORD"
sudo useradd --create-home --shell /bin/bash --user-group subversion
echo "subversion:$ACCOUNT_PASSWORD" | chpasswd

# Subversion group
sudo adduser www-data subversion # Only needed if publishing the repo via HTTP of HTTPS.

# Needed for file:/// access by Jenkins.
# If Jenkins is installed on the same server.
if [ -d /home/jenkins ]; then
    sudo adduser jenkins subversion 
fi

# Create a repository area
sudo mkdir /usr/local/svn
sudo mkdir /usr/local/svn/repos

# Create a repository
cd /usr/local/svn/repos
sudo mkdir $PROJECT_NAME
umask 002
sudo svnadmin create /usr/local/svn/repos/$PROJECT_NAME
umask 022

# Adjust permissions twice.
# www-data is there for when we setup WebDAV.
cd /usr/local/svn/repos
sudo chown -R www-data:subversion .
sudo chmod -R g+rws .
sudo chown -R www-data:subversion .
sudo chmod -R g+rws .

# Add one repo user.
echo -e "Adding a repository user: $SVN_USERNAME\tSVN_PASSWORD"
sudo useradd --create-home --shell /bin/bash --user-group $SVN_USERNAME
echo "$SVN_USERNAME\t$SVN_PASSWORD" | chpasswd
sudo adduser $SVN_USERNAME subversion # Only needed if publishing the repo via HTTP of HTTPS.

# TODO.<commit_msg>RR: fixed password setting issue.<commit_after>#!/bin/bash
# ===========================================
# Install Common Code for Subversion Server
#
# Sets up:
#	Subversion.
# Resources:
# 	https://help.ubuntu.com/community/Subversion
#	https://help.ubuntu.com/community/ApacheHTTPserver
#	https://help.ubuntu.com/community/forum/server/apache2/SSL
#	http://odyniec.net/articles/ubuntu-subversion-server/

# To run script standalone:
# ===========================================

# Some of these things may already be done by a driver script.

echo "Install common code for Subversion (SVN) server. "

# Preparation.

sudo apt-get -y update
sudo apt-get -y upgrade

echo "Installing python support. "
apt-get -y install python-software-properties python-setuptools 


# TODO.
# Install Apache
# Install certificate.

# Download and install Subversion

echo "Installing Subversion. "

sudo apt-get install -y subversion

# Subversion user/group and directory
echo -e "Adding the subversion application user: subversion:$ACCOUNT_PASSWORD"
sudo useradd --create-home --shell /bin/bash --user-group subversion
echo "subversion:$ACCOUNT_PASSWORD" | chpasswd

# Subversion group
sudo adduser www-data subversion # Only needed if publishing the repo via HTTP of HTTPS.

# Needed for file:/// access by Jenkins.
# If Jenkins is installed on the same server.
if [ -d /home/jenkins ]; then
    sudo adduser jenkins subversion 
fi

# Create a repository area
sudo mkdir /usr/local/svn
sudo mkdir /usr/local/svn/repos

# Create a repository
cd /usr/local/svn/repos
sudo mkdir $PROJECT_NAME
umask 002
sudo svnadmin create /usr/local/svn/repos/$PROJECT_NAME
umask 022

# Adjust permissions twice.
# www-data is there for when we setup WebDAV.
cd /usr/local/svn/repos
sudo chown -R www-data:subversion .
sudo chmod -R g+rws .
sudo chown -R www-data:subversion .
sudo chmod -R g+rws .

# Add one repo user.
echo -e "Adding a repository user: $SVN_USERNAME\t$SVN_PASSWORD"
sudo useradd --create-home --shell /bin/bash --user-group $SVN_USERNAME
echo "$SVN_USERNAME:$SVN_PASSWORD" | chpasswd
sudo adduser $SVN_USERNAME subversion # Only needed if publishing the repo via HTTP of HTTPS.

# TODO.
{'fraction_non_alphanumeric': 0.1334716459197787, 'fraction_numerical': 0.003227293683725219, 'mean_word_length': 4.196407185628742, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1318355', 'n_tokens_mistral': 1473, 'n_tokens_neox': 1353, 'n_words': 455}