<commit_before>#!/bin/bash
SITENAME=${1:?"You must enter the name of the site you want to install."}
TERMINUS='php /home/vagrant/cli/php/boot-fs.php'
LOCAL_DIR="/srv/www/$1"; #should be an empty dir
DB_NAME="pantheon_$( echo $1 | sed -r 's/-//g')"
DBUSER="$( echo $1 | sed -r 's/-//g')"
DBPASS="$( echo $1 | sed -r 's/-//g')"
SITE_ID=$( $TERMINUS site info --site=$SITENAME --bash --nocache=1 | grep ^id | awk '{print $2}' )
GIT_REMOTE="ssh://codeserver.dev.$SITE_ID@codeserver.dev.$SITE_ID.drush.in:2222/~/repository.git"
echo "GIT_REMOTE=$GIT_REMOTE"

if [ ! -d $LOCAL_DIR ] ; then
	mkdir -p $LOCAL_DIR;
fi

cd $LOCAL_DIR

$TERMINUS site backup get --site=$SITENAME --element=files --env='dev' --to-directory=$LOCAL_DIR --latest || exit 1
$TERMINUS site backup get --site=$SITENAME --element=database --env='dev' --to-directory=$LOCAL_DIR --latest || exit 1

DB=$( ls . | grep "database.*gz" )
FILES=$( ls . | grep "files.*gz" )

# code first
if [[ ! -d code ]]; then<commit_msg>fix creat-local shell file call to terminus site backup get to use new element db value.<commit_after>#!/bin/bash
SITENAME=${1:?"You must enter the name of the site you want to install."}
TERMINUS='php /home/vagrant/cli/php/boot-fs.php'
LOCAL_DIR="/srv/www/$1"; #should be an empty dir
DB_NAME="pantheon_$( echo $1 | sed -r 's/-//g')"
DBUSER="$( echo $1 | sed -r 's/-//g')"
DBPASS="$( echo $1 | sed -r 's/-//g')"
SITE_ID=$( $TERMINUS site info --site=$SITENAME --bash --nocache=1 | grep ^id | awk '{print $2}' )
GIT_REMOTE="ssh://codeserver.dev.$SITE_ID@codeserver.dev.$SITE_ID.drush.in:2222/~/repository.git"
echo "GIT_REMOTE=$GIT_REMOTE"

if [ ! -d $LOCAL_DIR ] ; then
	mkdir -p $LOCAL_DIR;
fi

cd $LOCAL_DIR

$TERMINUS site backup get --site=$SITENAME --element=files --env='dev' --to-directory=$LOCAL_DIR --latest || exit 1
$TERMINUS site backup get --site=$SITENAME --element=db --env='dev' --to-directory=$LOCAL_DIR --latest || exit 1

DB=$( ls . | grep "database.*gz" )
FILES=$( ls . | grep "files.*gz" )

# code first
if [[ ! -d code ]]; then
{'fraction_non_alphanumeric': 0.20580994583948795, 'fraction_numerical': 0.012801575578532743, 'mean_word_length': 3.8380952380952382, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, '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': '2063988', 'n_tokens_mistral': 843, 'n_tokens_neox': 777, 'n_words': 214}