<commit_before>#!/bin/bash
ROOT=$1

MAKE_INDENT_LEVEL="${MAKE_INDENT_LEVEL:-0}"
PREFIX=`ScriptsLib/PrintLevelLeader.sh $MAKE_INDENT_LEVEL`

if [ ! -e $ROOT ] ; then
	echo "$PREFIX$ROOT doesn't exist, so you cannot link to it as a build root"
	exit 1;
fi
ROOT=`realpath $ROOT`

echo "$PREFIX""Linking Stroika output and configuration directories from `pwd` to $ROOT"

rm -rf Builds ConfigurationFiles IntermediateFiles

TARGET_INTERMEDIATEFILES=$ROOT/IntermediateFiles
TARGET_BUILDS=$ROOT/Builds
TARGET_CONFIGURATIONFILES=$ROOT/ConfigurationFiles
if [[ `uname` =~ "CYGWIN" ]] ; then
	TARGET_INTERMEDIATEFILES=`cygpath -w $TARGET_INTERMEDIATEFILES`
	TARGET_BUILDS=`cygpath -w $TARGET_BUILDS`
	TARGET_CONFIGURATIONFILES=`cygpath -w $TARGET_CONFIGURATIONFILES`
fi

mkdir -p $TARGET_INTERMEDIATEFILES
ScriptsLib/MakeDirectorySymbolicLink.sh IntermediateFiles $TARGET_INTERMEDIATEFILES

mkdir -p $TARGET_BUILDS
ScriptsLib/MakeDirectorySymbolicLink.sh Builds $TARGET_BUILDS

mkdir -p $TARGET_CONFIGURATIONFILES
ScriptsLib/MakeDirectorySymbolicLink.sh ConfigurationFiles $TARGET_CONFIGURATIONFILES<commit_msg>Now that windows properly supports symbolic links (mixing with cygwin and WSL) - it appears at least - we can just directly call ln -s instead of all that horrible magic (at least for relative paths which are easy to use for this tool)<commit_after>#!/bin/bash
ROOT=$1

MAKE_INDENT_LEVEL="${MAKE_INDENT_LEVEL:-0}"
PREFIX=`ScriptsLib/PrintLevelLeader.sh $MAKE_INDENT_LEVEL`

if [ ! -e $ROOT ] ; then
	echo "$PREFIX$ROOT doesn't exist, so you cannot link to it as a build root"
	exit 1;
fi

echo "$PREFIX""Linking Stroika output and configuration directories from `pwd` to $ROOT"

rm -rf Builds ConfigurationFiles IntermediateFiles

TARGET_INTERMEDIATEFILES=$ROOT/IntermediateFiles
TARGET_BUILDS=$ROOT/Builds
TARGET_CONFIGURATIONFILES=$ROOT/ConfigurationFiles

mkdir -p $TARGET_INTERMEDIATEFILES
ln -s $ROOT/IntermediateFiles IntermediateFiles

mkdir -p $TARGET_BUILDS
ln -s $ROOT/Builds Builds

mkdir -p $TARGET_CONFIGURATIONFILES
ln -s $ROOT/ConfigurationFiles ConfigurationFiles
{'fraction_non_alphanumeric': 0.08413461538461539, 'fraction_numerical': 0.0028846153846153848, 'mean_word_length': 6.823308270676692, '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': '91760', 'n_tokens_mistral': 697, 'n_tokens_neox': 659, 'n_words': 187}