<commit_before>#!/bin/bash

##########################
#    DUNITER EXECUTABLE
#
# Wraps bin/duniter that is called with Node.js
#

DEB_PACKAGING=

if [[ $DEB_PACKAGING ]]; then
  DUNITER_DIR=/opt/duniter/
fi

duniter() {

	local NODE
	local LOGS_FILE

	if [ -z "$DEV_MODE" ]; then

		### Production mode
		if [[ -d $DUNITER_DIR/node ]]; then
			NODE=$DUNITER_DIR/node/bin/node
	  else
	    echo "Node.js is not embedded in this version of Duniter"
	    return
		fi;
	else

		### Cheating with DEV mode
		DUNITER_DIR=`pwd`
		NODE=node
	fi

	VERSION=`$NODE -v`

	if [[ $VERSION != v8* ]] && [[ $VERSION != v9* ]]; then
	  echo "$NODE v8 or v9 is required";
	else

	  # Calls duniter JS command
	  cd $DUNITER_DIR
	  $NODE "$DUNITER_DIR/bin/duniter" "$@"

	fi;
}

# If the script was launched with parameters, try to launch the Duniter command
if [ ! -z $1 ]; then
	duniter "$@"
fi<commit_msg>[mod] #1373: duniter.sh: move to Nodejs v10<commit_after>#!/bin/bash

##########################
#    DUNITER EXECUTABLE
#
# Wraps bin/duniter that is called with Node.js
#

DEB_PACKAGING=

if [[ $DEB_PACKAGING ]]; then
  DUNITER_DIR=/opt/duniter/
fi

duniter() {

	local NODE
	local LOGS_FILE

	if [ -z "$DEV_MODE" ]; then

		### Production mode
		if [[ -d $DUNITER_DIR/node ]]; then
			NODE=$DUNITER_DIR/node/bin/node
	  else
	    echo "Node.js is not embedded in this version of Duniter"
	    return
		fi;
	else

		### Cheating with DEV mode
		DUNITER_DIR=`pwd`
		NODE=node
	fi

	VERSION=`$NODE -v`

	if [[ $VERSION != v10* ]]; then
	  echo "$NODE v10 is required";
	else

	  # Calls duniter JS command
	  cd $DUNITER_DIR
	  $NODE "$DUNITER_DIR/bin/duniter" "$@"

	fi;
}

# If the script was launched with parameters, try to launch the Duniter command
if [ ! -z $1 ]; then
	duniter "$@"
fi
{'fraction_non_alphanumeric': 0.15591699383062255, 'fraction_numerical': 0.0089736399326977, 'mean_word_length': 3.227488151658768, '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': '281577', 'n_tokens_mistral': 756, 'n_tokens_neox': 687, 'n_words': 195}