<commit_before>#!/bin/bash

lowercase() {
	echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/";
}

OS=`lowercase \`uname\``;
ARCH=`lowercase \`uname -m\``;
USER_WHO=`whoami`;
USER_LOG=`logname 2> /dev/null`;


# XXX: Allow sudo usage
if [ "$SUDO_USER" != "" ]; then
	USER_WHO="$SUDO_USER";
fi;


# XXX: Allow /tmp/lycheejs usage
if [ -z "$LYCHEEJS_ROOT" ]; then
	LYCHEEJS_ROOT="/opt/lycheejs";
fi;


echo -e " --> $LYCHEEJS_ROOT\n";


LYCHEEJS_NODE="";
PACKAGE_CMD="";
CORE_FLAG="false";


if [ "$1" == "--core" ]; then
	CORE_FLAG="true";
fi;


if [ "$ARCH" == "x86_64" -o "$ARCH" == "amd64" ]; then
	ARCH="x86_64";
fi;

if [ "$ARCH" == "i386" -o "$ARCH" == "i686" -o "$ARCH" == "i686-64" ]; then
	ARCH="x86";<commit_msg>:bug: Fix for bin/configure.sh script<commit_after>#!/bin/bash

lowercase() {
	echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/";
}

OS=`lowercase \`uname\``;
ARCH=`lowercase \`uname -m\``;
USER_WHO=`whoami`;
USER_LOG=`logname 2> /dev/null`;


# XXX: Allow sudo usage
if [ "$SUDO_USER" != "" ]; then
	USER_WHO="$SUDO_USER";
fi;


# XXX: Allow /tmp/lycheejs usage
if [ -z "$LYCHEEJS_ROOT" ]; then

	LYCHEEJS_ROOT="/opt/lycheejs";

	# XXX: Allow sandboxed usage
	auto_root=$(dirname "$(dirname "$(realpath "$0")")");
	if [ "$auto_root" != "$LYCHEEJS_ROOT" ]; then
		LYCHEEJS_ROOT="$auto_root";
	fi;

fi;


echo -e " --> $LYCHEEJS_ROOT\n";


LYCHEEJS_NODE="";
PACKAGE_CMD="";
CORE_FLAG="false";


if [ "$1" == "--core" ]; then
	CORE_FLAG="true";
fi;


if [ "$ARCH" == "x86_64" -o "$ARCH" == "amd64" ]; then
	ARCH="x86_64";
fi;

if [ "$ARCH" == "i386" -o "$ARCH" == "i686" -o "$ARCH" == "i686-64" ]; then
	ARCH="x86";
{'fraction_non_alphanumeric': 0.2348394768133175, 'fraction_numerical': 0.03151010701545779, 'mean_word_length': 4.429032258064516, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2707225', 'n_tokens_mistral': 836, 'n_tokens_neox': 756, 'n_words': 149}