<commit_before>#
# ezvm selfupdate
#

ORIGINAL_ARGS=$@

while getopts ":qV:" flag; do
    case "$flag" in
        q)
            export EZVM_VERBOSITY=0
            ;;
        V)
            export EZVM_VERBOSITY=$OPTARG
            ;;
        *)
            printUsageAndExit ;;
    esac
done
shift $((OPTIND-1))

$EZVM_BIN_DIR/verbose-log 2 <<END_LOG
#
# $0 selfupdate $ORIGINAL_ARGS
#
END_LOG

log_msg 1 "Pulling latest ezvm release from Github"

if ! git pull; then
    # `git pull` failed!
    {
        echo
        echo "FATAL: git pull failed"
        echo
    } 1>&2
    exit 3
fi<commit_msg>selfupdate now works no matter what directory we're running in<commit_after>#
# ezvm selfupdate
#

ORIGINAL_ARGS=$@

while getopts ":qV:" flag; do
    case "$flag" in
        q)
            export EZVM_VERBOSITY=0
            ;;
        V)
            export EZVM_VERBOSITY=$OPTARG
            ;;
        *)
            printUsageAndExit ;;
    esac
done
shift $((OPTIND-1))

$EZVM_BIN_DIR/verbose-log 2 <<END_LOG

$0 selfupdate $ORIGINAL_ARGS

END_LOG

log_msg 1 "Pulling latest ezvm release from Github"

if ! cd "$EZVM_BASE_DIR"; then
    echo "FATAL: Cannot cd to BASE_DIR: $EZVM_BASE_DIR" 1>&2
    exit 4
fi

if ! git pull; then
    # `git pull` failed!
    {
        echo
        echo "FATAL: git pull failed"
        echo
    } 1>&2
    exit 3
fi
{'fraction_non_alphanumeric': 0.09748892171344166, 'fraction_numerical': 0.014032496307237814, 'mean_word_length': 2.011111111111111, 'pattern_counts': {'":': 2, '<': 7, '<?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': '1642400', 'n_tokens_mistral': 520, 'n_tokens_neox': 499, 'n_words': 136}