<commit_before>#!/usr/bin/env bash

SCRIPT_BUILD=2015090801

## Osync daemon install script
## Tested on RHEL / CentOS 6 & 7 and Mint 17
## Please adapt this to fit your distro needs

if [ "$(whoami)" != "root" ]; then
  echo "Must be run as root."
  exit 1
fi

if [ ! -d /etc/osync ]; then
	mkdir /etc/osync
fi

cp ./sync.conf /etc/osync/sync.conf.example
cp ./exclude.list.example /etc/osync
cp ./osync.sh /usr/local/bin
cp ./osync-batch.sh /usr/local/bin
cp ./ssh_filter.sh /usr/local/bin
cp ./osync-srv /etc/init.d
chmod 755 /usr/local/bin/osync.sh
chmod 755 /usr/local/bin/osync-batch.sh
chmod 755 /usr/local/bin/ssh_filter.sh
chown root:root /usr/local/bin/ssh_filter.sh
chmod 755 /etc/init.d/osync-srv


<commit_msg>Minor improvements for install script.<commit_after>#!/usr/bin/env bash

SCRIPT_BUILD=2015092801

## Osync daemon install script
## Tested on RHEL / CentOS 6 & 7 and Mint 17
## Please adapt this to fit your distro needs

OSYNC_CONF_DIR=/etc/osync
BIN_DIR=/usr/local/bin
SERVICE_DIR=/etc/init.d

if [ "$(whoami)" != "root" ]; then
  echo "Must be run as root."
  exit 1
fi

if [ ! -d "$OSYNC_CONF_DIR" ]; then
	mkdir "$OSYNC_CONF_DIR"
	if [ $? == 0 ]; then
		echo "Created directory [$OSYNC_CONF_DIR]."
	fi
else
	echo "Config directory [$OSYNC_CONF_DIR] exists."
fi

cp ./sync.conf /etc/osync/sync.conf.example
cp ./exclude.list.example /etc/osync
cp ./osync.sh "$BIN_DIR"
if [ $? != 0 ]; then
	echo "Cannot copy osync.sh to [$BIN_DIR]."
else
	echo "Copied osync.sh to [$BIN_DIR]."
fi
cp ./osync-batch.sh /usr/local/bin
if [ $? != 0 ]; then
	echo "Cannot copy osync-batch.sh to [$BIN_DIR]."
else
	echo "Copied osync-batch.sh to [$BIN_DIR]."
fi
cp ./ssh_filter.sh /usr/local/bin
if [ $? != 0 ]; then
	echo "Cannot copy ssh_filter.sh to [$BIN_DIR]."
else
	echo "Copied ssh_filter.sh to [$BIN_DIR]."
fi
cp ./osync-srv "$SERVICE_DIR"
if [ $? != 0 ]; then
	echo "Cannot copy osync-srv to [$SERVICE_DIR]."
else
	echo "Created osync-srv service in [$SERVICE_DIR]."
fi
chmod 755 /usr/local/bin/osync.sh
chmod 755 /usr/local/bin/osync-batch.sh
chmod 755 /usr/local/bin/ssh_filter.sh
chown root:root /usr/local/bin/ssh_filter.sh
chmod 755 /etc/init.d/osync-srv



{'fraction_non_alphanumeric': 0.15310344827586206, 'fraction_numerical': 0.027126436781609194, 'mean_word_length': 3.440816326530612, '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': '1613994', 'n_tokens_mistral': 957, 'n_tokens_neox': 867, 'n_words': 244}