<commit_before>#!/bin/bash

# Convert kernel/rootfs images generated by build-yocto-qemux86
# into:
# - A VDI_IMAGE suitable to be executed inside QEMU and VirtualBox
# - A VMDK_IMAGE suitable to be executed inside VMware Player

# BIG FAT WARNING
# A few dangerous commands are executed as sudo and may destroy your host filesystem if buggy.
# USE AT YOUR OWN RISK - YOU HAVE BEEN WARNED!!!

# Prerequisites:
#    grub-install
#    kpartx
#    parted
#    qemu-img
#    sudo

# CONFIGURATION ITEMS

TOPDIR=$PWD/tmp/build-horizon-6.0.0-qemux86

IMAGENAME=horizon-image
MACHINE=qemux86
FSTYPE=tar.bz2
KERNEL=$TOPDIR/tmp/deploy/images/$MACHINE/bzImage-$MACHINE.bin
ROOTFS=$TOPDIR/tmp/deploy/images/$MACHINE/${IMAGENAME}-${MACHINE}.${FSTYPE}

RAW_IMAGE=$PWD/test.raw
VDI_IMAGE=$PWD/test.vdi
VMDK_IMAGE=$PWD/test.vmdk

MNT_ROOTFS=/tmp/rootfs

DISK_SIZE_MB=256

set -e
#set -x

#Check if all required commands exist
cmd_exists() {
    while [ -n "$1" ]
    do
	#echo "DBG: Checking for $1"
        command -v $1 >/dev/null 2>&1 || { \
	    echo >&2 "ERROR: command '$1' is required but not installed"; \
	    notOK=1; \
	}
        shift
    done
    if [ -n "$notOK" ]; then<commit_msg>Update TOPDIR to match instructions in README.md<commit_after>#!/bin/bash

# Convert kernel/rootfs images generated by build-yocto-qemux86
# into:
# - A VDI_IMAGE suitable to be executed inside QEMU and VirtualBox
# - A VMDK_IMAGE suitable to be executed inside VMware Player

# BIG FAT WARNING
# A few dangerous commands are executed as sudo and may destroy your host filesystem if buggy.
# USE AT YOUR OWN RISK - YOU HAVE BEEN WARNED!!!

# Prerequisites:
#    grub-install
#    kpartx
#    parted
#    qemu-img
#    sudo

# CONFIGURATION ITEMS

TOPDIR=$PWD/tmp/my-genivi-build

IMAGENAME=horizon-image
MACHINE=qemux86
FSTYPE=tar.bz2
KERNEL=$TOPDIR/tmp/deploy/images/$MACHINE/bzImage-$MACHINE.bin
ROOTFS=$TOPDIR/tmp/deploy/images/$MACHINE/${IMAGENAME}-${MACHINE}.${FSTYPE}

RAW_IMAGE=$PWD/test.raw
VDI_IMAGE=$PWD/test.vdi
VMDK_IMAGE=$PWD/test.vmdk

MNT_ROOTFS=/tmp/rootfs

DISK_SIZE_MB=256

set -e
#set -x

#Check if all required commands exist
cmd_exists() {
    while [ -n "$1" ]
    do
	#echo "DBG: Checking for $1"
        command -v $1 >/dev/null 2>&1 || { \
	    echo >&2 "ERROR: command '$1' is required but not installed"; \
	    notOK=1; \
	}
        shift
    done
    if [ -n "$notOK" ]; then
{'fraction_non_alphanumeric': 0.12075471698113208, 'fraction_numerical': 0.01551362683438155, 'mean_word_length': 3.4598130841121497, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1076423', 'n_tokens_mistral': 956, 'n_tokens_neox': 903, 'n_words': 237}