<commit_before>#!/bin/bash

rm -rf /tmp/hyperstart-rootfs
mkdir -p /tmp/hyperstart-rootfs/lib /tmp/hyperstart-rootfs/lib64 /tmp/hyperstart-rootfs/lib/modules

cp ../src/init /tmp/hyperstart-rootfs
cp busybox /tmp/hyperstart-rootfs
cp iptables /tmp/hyperstart-rootfs
cp libm.so.6 /tmp/hyperstart-rootfs/lib64/
tar -xf modules.tar -C /tmp/hyperstart-rootfs/lib/modules

ldd /tmp/hyperstart-rootfs/init | while read line
do
	arr=(${line// / })

	for lib in ${arr[@]}
	do
		if [ "${lib:0:1}" = "/" ]; then
			dir=/tmp/hyperstart-rootfs`dirname $lib`
			mkdir -p "${dir}"
			cp -f $lib $dir
		fi
	done
done

if [ "$1"x = "vbox"x ]; then
	echo "build initrd for vbox"
	cp ./vbox/driver/* /tmp/hyperstart-rootfs
fi

( cd /tmp/hyperstart-rootfs && find . | cpio -H newc -o | gzip -9 ) > ./hyper-initrd.img

cd ../
rm -rf /tmp/hyperstart-rootfs

if [ "$1"x = "cbfs"x ]; then
	echo "build cbfs"
	rm -rf .cbfs
	rm -rf cbfs.rom
<commit_msg>remove unexpectedly cd ..<commit_after>#!/bin/bash

rm -rf /tmp/hyperstart-rootfs
mkdir -p /tmp/hyperstart-rootfs/lib /tmp/hyperstart-rootfs/lib64 /tmp/hyperstart-rootfs/lib/modules

cp ../src/init /tmp/hyperstart-rootfs
cp busybox /tmp/hyperstart-rootfs
cp iptables /tmp/hyperstart-rootfs
cp libm.so.6 /tmp/hyperstart-rootfs/lib64/
tar -xf modules.tar -C /tmp/hyperstart-rootfs/lib/modules

ldd /tmp/hyperstart-rootfs/init | while read line
do
	arr=(${line// / })

	for lib in ${arr[@]}
	do
		if [ "${lib:0:1}" = "/" ]; then
			dir=/tmp/hyperstart-rootfs`dirname $lib`
			mkdir -p "${dir}"
			cp -f $lib $dir
		fi
	done
done

if [ "$1"x = "vbox"x ]; then
	echo "build initrd for vbox"
	cp ./vbox/driver/* /tmp/hyperstart-rootfs
fi

( cd /tmp/hyperstart-rootfs && find . | cpio -H newc -o | gzip -9 ) > ./hyper-initrd.img

rm -rf /tmp/hyperstart-rootfs

if [ "$1"x = "cbfs"x ]; then
	echo "build cbfs"
	rm -rf .cbfs
	rm -rf cbfs.rom

{'fraction_non_alphanumeric': 0.17356260075228372, 'fraction_numerical': 0.010746910263299301, 'mean_word_length': 2.970149253731343, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5731593', 'n_tokens_mistral': 815, 'n_tokens_neox': 778, 'n_words': 188}