<commit_before>#!/bin/sh

DISTDIR=package

rm -rf $DISTDIR
mkdir $DISTDIR

TODAY=$(date +"%m%d%Y")

echo "Building..."
go build -o $DISTDIR/rstore main.go
go build -o $DISTDIR/apihelper cmd/apihelper/main.go
go build -o $DISTDIR/rstcli cmd/cli/main.go

cd $DISTDIR

mkdir -p var/logs

if [ ! -x rstore ] || [ ! -x apihelper ] || [ ! -x rstcli ]; then
	echo "Build rstore error"
	exit 1
fi

echo "Stripping binaries..."
strip rstore
strip apihelper
strip rstcli

PACKAGE=RSTORE-$TODAY".tgz"

echo "Packaging..."
cp ../config.yml config-raw.yml
tar -zcf $PACKAGE ../frontend rstore rstcli apihelper var *.yml

echo ""
echo "Build Successfully, got file $PACKAGE"
echo ""<commit_msg>add restart scripts<commit_after>#!/bin/sh

DISTDIR=package

rm -rf $DISTDIR
mkdir $DISTDIR

TODAY=$(date +"%m%d%Y")

echo "Building..."
go build -o $DISTDIR/rstore main.go
go build -o $DISTDIR/apihelper cmd/apihelper/main.go
go build -o $DISTDIR/rstcli cmd/cli/main.go

cd $DISTDIR

mkdir -p var/logs

if [ ! -x rstore ] || [ ! -x apihelper ] || [ ! -x rstcli ]; then
	echo "Build rstore error"
	exit 1
fi

echo "Stripping binaries..."
strip rstore
strip apihelper
strip rstcli

PACKAGE=RSTORE-$TODAY".tgz"

echo "Packaging..."
cp ../config.yml config-raw.yml
cp ../restart.sh .
tar -zcf $PACKAGE ../frontend rstore rstcli apihelper var *.yml *.sh

echo ""
echo "Build Successfully, got file $PACKAGE"
echo ""
{'fraction_non_alphanumeric': 0.15035971223021583, 'fraction_numerical': 0.0014388489208633094, 'mean_word_length': 3.560655737704918, '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': '1583364', 'n_tokens_mistral': 571, 'n_tokens_neox': 524, 'n_words': 161}