<commit_before>#!/bin/sh

if which npm &> /dev/null
then
    echo "NPM is installed. You should probably install cocos2d-javascript as an npm package using this command instead:\n    npm install .\n"

    read -p "Continue anyway? (y/n) : " yn
    case $yn in
        [Nn]* ) exit;;
        [Yy]* ) break;;
        * ) echo "Enter 'y' or 'n'"
    esac
fi

DIR=`dirname $0`

read -p "Where should I install to? (/usr/local/cocos2d-javascript/) : " install_to

if [ -z "$install_to" ]
then
    install_to='/usr/local/cocos2d-javascript/'
fi

echo "Installing to: $install_to"

mkdir -p $install_to

cd $DIR

for file in `find * \( ! -regex '.*/\..*' \) -type f`
do
    dst="$install_to/$file"
    dst_dir=`dirname $dst`
    if [ ! -d $dst_dir ]
    then
        mkdir -p $dst_dir
    fi

    cp $file $dst
done

cd -

echo "All files copied."

ln -s $install_to/bin/cocos.sh /usr/local/bin/cocos
<commit_msg>Fixed installation script's handling of spaces.<commit_after>#!/bin/sh

if which npm &> /dev/null
then
    echo "NPM is installed. You should probably install cocos2d-javascript as an npm package using this command instead:\n    npm install .\n"

    read -p "Continue anyway? (y/n) : " yn
    case $yn in
        [Nn]* ) exit;;
        [Yy]* ) break;;
        * ) echo "Enter 'y' or 'n'"
    esac
fi

DIR=`dirname $0`

read -p "Where should I install to? (/usr/local/cocos2d-javascript/) : " install_to

if [ -z "$install_to" ]
then
    install_to='/usr/local/cocos2d-javascript/'
fi

echo "Installing to: $install_to"

mkdir -p "$install_to"

cd $DIR

IFS=$'\n'
for file in `find * \( ! -regex '.*/\..*' \) -type f`
do
    dst="$install_to/$file"
    dst_dir=`dirname "$dst"`
    if [ ! -d "$dst_dir" ]
    then
        mkdir -p "$dst_dir"
    fi

    cp "$file" "$dst"
done

cd -

echo "All files copied."

ln -s "$install_to/bin/cocos.sh" "/usr/local/bin/cocos"

{'fraction_non_alphanumeric': 0.15758547008547008, 'fraction_numerical': 0.004273504273504274, 'mean_word_length': 2.5140712945590993, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3977487', 'n_tokens_mistral': 738, 'n_tokens_neox': 702, 'n_words': 214}