<commit_before>#!/bin/bash

if [[ $EUID -ne 0 ]]; then
    # Exits with return = 1 if user is not root.
    echo "This script must be executed as root."
    exit 1
fi

if [ ! -d $DATADIR ]; then
    echo "First argument must be the actual data directory."
    exit 2
fi

if [ ! -b $DEVICE ]; then
    echo "Second argument must be the new partion."
    exit 3
fi

DATADIR = $(readlink -f $1)
DEVICE = $2

#Stop postgres
service postgresql stop

#Make temp dir
TEMP = $(mktemp -d)

#Mount device in temp dir
/usr/share/google/safe_format_and_mount -m "mkfs.ext4 -F" $DEVICE $TEMP
<commit_msg>[FIX] bad variables<commit_after>#!/bin/bash

if [[ $EUID -ne 0 ]]; then
    # Exits with return = 1 if user is not root.
    echo "This script must be executed as root."
    exit 1
fi

if [ ! -d $1 ]; then
    echo "First argument must be the actual data directory."
    exit 2
fi

if [ ! -b $2 ]; then
    echo "Second argument must be the new partion."
    exit 3
fi

DATADIR = $(readlink -f $1)
DEVICE = $2

#Stop postgres
service postgresql stop

#Make temp dir
TEMP = $(mktemp -d)

#Mount device in temp dir
/usr/share/google/safe_format_and_mount -m "mkfs.ext4 -F" $DEVICE $TEMP

{'fraction_non_alphanumeric': 0.11214953271028037, 'fraction_numerical': 0.015293118096856415, 'mean_word_length': 2.862295081967213, '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': '1061211', 'n_tokens_mistral': 431, 'n_tokens_neox': 417, 'n_words': 172}