<commit_before>#!/bin/bash
set -e

DEFINES=""
[ "$1" = "test" ] && DEFINES="-DFOR_VALGRIND -g" || DEFINES="-DNDEBUG -O2 -flto"
[ "$1" = "x86_bsd" ] && DEFINES="$DEFINES -DX86_BSD"

( g++ $DEFINES -std=c++11 -Wall -pthread -I. -I/usr/include ./client.cpp ./flaggedarrayset.cpp ./utils.cpp ./p2pclient.cpp ./crypto/sha2.cpp -o relaynetworkclient &&
( [ "$1" != "test" ] && strip relaynetworkclient || echo -n ) &&
mv relaynetworkclient ../client ) || ( echo "Failed to build local client using g++"; exit -1 )

( g++ $DEFINES -std=c++11 -Wall -pthread -I. -I/usr/include ./server.cpp ./flaggedarrayset.cpp ./utils.cpp ./p2pclient.cpp ./blocks.cpp ./crypto/sha2.cpp -o relaynetworkserver &&
( [ "$1" != "test" ] && strip relaynetworkserver || echo -n ) &&
mv relaynetworkserver .. ) || ( echo "Failed to build server using g++"; exit -1 )

( g++ $DEFINES -std=c++11 -Wall -pthread -I. -I/usr/include ./bitcoindterminator.cpp ./utils.cpp ./crypto/sha2.cpp -o relaynetworkterminator &&
( [ "$1" != "test" ] && strip relaynetworkterminator || echo -n ) &&
mv relaynetworkterminator .. ) || ( echo "Failed to build server terminator using g++"; exit -1 )

( g++ $DEFINES -std=c++11 -Wall -pthread -I. -I/usr/include ./p2poutbound.cpp ./utils.cpp ./p2pclient.cpp ./crypto/sha2.cpp -o relaynetworkoutbound &&
( [ "$1" != "test" ] && strip relaynetworkoutbound || echo -n ) &&
mv relaynetworkoutbound .. ) || ( echo "Failed to build server outbound client using g++"; exit -1 )

( i686-w64-mingw32-g++ $DEFINES -std=c++11 -Wall -DWIN32 -mno-ms-bitfields -static -static-libgcc -I. ./client.cpp ./flaggedarrayset.cpp ./utils.cpp ./p2pclient.cpp ./crypto/sha2.cpp -lwsock32 -lmingwthrd -lws2_32 -o relaynetworkclient.exe &&
( [ "$1" != "test" ] && i686-w64-mingw32-strip relaynetworkclient.exe || echo -n ) &&
mv relaynetworkclient.exe ../client ) || ( echo "Failed to build windows client with mingw"; exit -1 )
<commit_msg>Only make the client binary unless all are requested<commit_after>#!/bin/bash
set -e

DEFINES=""
[ "$1" = "test" ] && DEFINES="-DFOR_VALGRIND -g" || DEFINES="-DNDEBUG -O2 -flto"
[ "$1" = "x86_bsd" ] && DEFINES="$DEFINES -DX86_BSD"

( g++ $DEFINES -std=c++11 -Wall -pthread -I. -I/usr/include ./client.cpp ./flaggedarrayset.cpp ./utils.cpp ./p2pclient.cpp ./crypto/sha2.cpp -o relaynetworkclient &&
( [ "$1" != "test" ] && strip relaynetworkclient || echo -n ) &&
mv relaynetworkclient ../client ) || ( echo "Failed to build local client using g++"; exit -1 )

if [ "$2" = "all" ]; then
	( g++ $DEFINES -std=c++11 -Wall -pthread -I. -I/usr/include ./server.cpp ./flaggedarrayset.cpp ./utils.cpp ./p2pclient.cpp ./blocks.cpp ./crypto/sha2.cpp -o relaynetworkserver &&
	( [ "$1" != "test" ] && strip relaynetworkserver || echo -n ) &&
	mv relaynetworkserver .. ) || ( echo "Failed to build server using g++"; exit -1 )

	( g++ $DEFINES -std=c++11 -Wall -pthread -I. -I/usr/include ./bitcoindterminator.cpp ./utils.cpp ./crypto/sha2.cpp -o relaynetworkterminator &&
	( [ "$1" != "test" ] && strip relaynetworkterminator || echo -n ) &&
	mv relaynetworkterminator .. ) || ( echo "Failed to build server terminator using g++"; exit -1 )

	( g++ $DEFINES -std=c++11 -Wall -pthread -I. -I/usr/include ./p2poutbound.cpp ./utils.cpp ./p2pclient.cpp ./crypto/sha2.cpp -o relaynetworkoutbound &&
	( [ "$1" != "test" ] && strip relaynetworkoutbound || echo -n ) &&
	mv relaynetworkoutbound .. ) || ( echo "Failed to build server outbound client using g++"; exit -1 )

	( i686-w64-mingw32-g++ $DEFINES -std=c++11 -Wall -DWIN32 -mno-ms-bitfields -static -static-libgcc -I. ./client.cpp ./flaggedarrayset.cpp ./utils.cpp ./p2pclient.cpp ./crypto/sha2.cpp -lwsock32 -lmingwthrd -lws2_32 -o relaynetworkclient.exe &&
	( [ "$1" != "test" ] && i686-w64-mingw32-strip relaynetworkclient.exe || echo -n ) &&
	mv relaynetworkclient.exe ../client ) || ( echo "Failed to build windows client with mingw"; exit -1 )
fi

{'fraction_non_alphanumeric': 0.1984126984126984, 'fraction_numerical': 0.029953917050691243, 'mean_word_length': 3.36536312849162, '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': '3565419', 'n_tokens_mistral': 1481, 'n_tokens_neox': 1409, 'n_words': 373}