<commit_before>#!/bin/bash

# the deploy target folder
FOLDER=deploy

# the deploy target suffix
SUFFIX=`date "+-%Y_%m_%d-%I_%M_%S%p"`

# The grandparent folder for this script
SOURCE=$(cd `dirname $0`/../; pwd)

# extract project folder name
NAME=${SOURCE##*/}

# target names
if [ -z $1 ]; then
	DEPLOY="$NAME$SUFFIX"
	TARGET="$SOURCE/$FOLDER/$DEPLOY"
	if [ -d $TARGET ]; then
		echo "$DEPLOY folder already exists, please rename or remove it and try again."
		exit 1
	fi
else
	TARGET=$1
#	read -p "Deploying to $TARGET (will remove existing if present). Are you sure? " -n 1
#	if [[ ! $REPLY =~ ^[Yy]$ ]]
#	then
#	    exit 1
#	fi
	rm -rf $TARGET
fi
	
echo "This script can create a deployment in $TARGET"

cat <<EOF
==========
build step
==========
EOF

./minify.sh

cat <<EOF
=========
copy step
=========
EOF

# make deploy folder
mkdir -p "$TARGET/lib"

# copy root folder files
cp "$SOURCE/index.html" "$SOURCE/icon.png" "$TARGET"

# copy assets and build
cp -r "$SOURCE/assets" "$SOURCE/build" "$TARGET"

for i in $SOURCE/lib/*; do
	o=${i##*/}
	if [ -x $i/deploy.sh ]; then
		echo "Deploying $o"
		$i/deploy.sh "$TARGET/lib/$o"
	else
		echo "Copying $o"
		cp -r $i "$TARGET/lib"
	fi
done<commit_msg>Recursively copy samples folders from enyo & lib into deploy folder. Enyo-DCO-1.0-Signed-off-by: <NAME> <<EMAIL>><commit_after>#!/bin/bash

# the deploy target folder
FOLDER=deploy

# the deploy target suffix
SUFFIX=`date "+-%Y_%m_%d-%I_%M_%S%p"`

# The grandparent folder for this script
SOURCE=$(cd `dirname $0`/../; pwd)

# extract project folder name
NAME=${SOURCE##*/}

# target names
if [ -z $1 ]; then
	DEPLOY="$NAME$SUFFIX"
	TARGET="$SOURCE/$FOLDER/$DEPLOY"
	if [ -d $TARGET ]; then
		echo "$DEPLOY folder already exists, please rename or remove it and try again."
		exit 1
	fi
else
	TARGET=$1
#	read -p "Deploying to $TARGET (will remove existing if present). Are you sure? " -n 1
#	if [[ ! $REPLY =~ ^[Yy]$ ]]
#	then
#	    exit 1
#	fi
	rm -rf $TARGET
fi
	
echo "This script can create a deployment in $TARGET"

cat <<EOF
==========
build step
==========
EOF

./minify.sh

cat <<EOF
=========
copy step
=========
EOF

# make deploy folder
mkdir -p "$TARGET/lib"

# copy root folder files
cp "$SOURCE/index.html" "$SOURCE/icon.png" "$TARGET"

# copy assets and build
cp -r "$SOURCE/assets" "$SOURCE/build" "$TARGET"

for i in $SOURCE/lib/*; do
	o=${i##*/}
	if [ -x $i/deploy.sh ]; then
		echo "Deploying $o"
		$i/deploy.sh "$TARGET/lib/$o"
	else
		echo "Copying $o"
		cp -r $i "$TARGET/lib"
	fi
done

# copy samples - sampler only step!
echo "Copying samples"
cd ..
for f in `find enyo lib -name samples -type d | sed 's/\/samples//g'`; 
	do mkdir -p $TARGET/$f/samples; 
	cp -r $f/samples $TARGET/$f; 
done
{'fraction_non_alphanumeric': 0.18515797207935342, 'fraction_numerical': 0.005143277002204262, 'mean_word_length': 3.561139028475712, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 6, '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': '2173630', 'n_tokens_mistral': 1077, 'n_tokens_neox': 1027, 'n_words': 343}