<commit_before>#!/bin/bash

if [ "$#" -lt 2 ]; then
    echo "Illegal number of parameters"
    echo "  mkimg.sh <config> <format> <distrofile>"
    exit 1
fi

CONFIG=$1
FORMAT=$2

if [ "$#" -gt 2 ]; then
LOADER=$3
else
LOADER="mageia-net"
fi

# There seems to be a problem with vdi image created by oz
# generate qcow2 image and then convert to vdi
GENFORMAT=$FORMAT
if [ "$FORMAT" == "vdi" ] ; then
GENFORMAT=qcow2
fi

pushd ~/.oz/images > /dev/null
rm -f $LOADER.$GENFORMAT $CONFIG.$GENFORMAT
popd > /dev/null
# There seems to be a problem with vdi image creates
oz-install -a $CONFIG.auto $LOADER.tdl -c oz-$GENFORMAT.cfg  -d3 -t 7200
<commit_msg>add command to deal with missing oz image<commit_after>#!/bin/bash

if [ "$#" -lt 2 ]; then
    echo "Illegal number of parameters"
    echo "  mkimg.sh <config> <format> <distrofile>"
    exit 1
fi

CONFIG=$1
FORMAT=$2

if [ "$#" -gt 2 ]; then
LOADER=$3
else
LOADER="mageia-net"
fi

# There seems to be a problem with vdi image created by oz
# generate qcow2 image and then convert to vdi
GENFORMAT=$FORMAT
if [ "$FORMAT" == "vdi" ] ; then
GENFORMAT=qcow2
fi

mkdir -p ~/.oz/images
pushd ~/.oz/images > /dev/null
rm -f $LOADER.$GENFORMAT $CONFIG.$GENFORMAT
popd > /dev/null
# There seems to be a problem with vdi image creates
oz-install -a $CONFIG.auto $LOADER.tdl -c oz-$GENFORMAT.cfg  -d3 -t 7200

{'fraction_non_alphanumeric': 0.13535502958579881, 'fraction_numerical': 0.019230769230769232, 'mean_word_length': 3.495016611295681, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '1939857', 'n_tokens_mistral': 516, 'n_tokens_neox': 498, 'n_words': 176}