<commit_before>#!/bin/sh

#echo "Do you wish to copy all contents in calibration/ to the git initialised repo?"
#select yn in "Yes" "No"; do
#	case $yn in
#		Yes ) echo "moving stuff" break;;
#		No ) exit;;
#	esac
#done

current="$(pwd)"

help () {
	echo "usage: $(basename $0) <path to git repo calibration folder>"
}

if [ $# -lt 1 ] ;
then
	help
	exit 1
elif [ $# -gt 1 ] ;
then
	help
	exit 1
fi

while true; do
	read -p "Confirm cp to '$1': " yn
	case $yn in
		[Yy]* ) break;;
		[Nn]* ) exit;;
		* ) echo "Please answer yes or no.";;
	esac
done

if [ -s "$1" ] ;
then
	cp -r "$current"/calibration/*.yaml "$1"
fi<commit_msg>Copying from directory different than current<commit_after>#!/bin/sh

# Make the script that puts the yaml calibration files in the git repo directory

current="" # current directory
param=1 # number of parameters to accept

help () {
	echo "usage: $(basename $0) <path from> <path to git repo calibration folder>"
}

youSure () {
	while true; do
		read -p "Confirm cp to '$1': " yn
		case $yn in
			[Yy]* ) break;;
			[Nn]* ) exit;;
			* ) echo "Please answer yes or no.";;
		esac
	done
}

copy (){
	if [ -s "$2" ] ;
	then
		youSure $2
		cp -r "$1"/*.yaml "$2"
	fi
}

init () {
	if [ $# -lt 1 ] ;
	then
		help
		exit 1
	elif [ $# -gt 2 ] ;
	then
		help
		exit 1
	fi

	while true; do
		read -p "Are you located in the directory you want to copy from? : " yn
		case $yn in
			[Yy]* ) current="$(pwd)"; break;;
			[Nn]* ) param=2; break;;
			* ) echo "Please answer yes or no.";;
		esac
	done

	if [ $# -lt $param ] ;
	then
		help
		exit 1
	elif [ $# -gt $param ] ;
	then
		help
		exit 1
	fi

	if [  -z "$current" ] ; then
		copy $1 $2
	else
		current="${current%???????}"/calibration
		copy $current $1
	fi
}

init $1 $2
{'fraction_non_alphanumeric': 0.1631368059530624, 'fraction_numerical': 0.015455065827132226, 'mean_word_length': 2.7510729613733904, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '1965594', 'n_tokens_mistral': 749, 'n_tokens_neox': 688, 'n_words': 255}