<commit_before>#! /bin/sh
if test -z "$ACE_ROOT"
then 
	echo "Set the ACE_ROOT environment variable first"
	exit
else
	echo "ACE_ROOT=$ACE_ROOT"
fi

#raw.ima - temporary grub disk. FAT.ima - Grub with FAT FS 
bximage -fd -q -size=1.44 $ACE_ROOT/img/raw.ima 
bximage -fd -q -size=1.44 $ACE_ROOT/img/FAT.ima 

#setting loopback device.
losetup /dev/loop0 $ACE_ROOT/img/raw.ima
losetup /dev/loop1 $ACE_ROOT/img/FAT.ima

#mount the images
mkdosfs /dev/loop1
mkdir -p $ACE_ROOT/img/mnt/FAT
mount -t msdos /dev/loop1  $ACE_ROOT/img/mnt/FAT

#create temp grub disk in raw format 
dd if=$ACE_ROOT/img/boot/grub/stage1 of=/dev/loop0 bs=512 count=1
dd if=$ACE_ROOT/img/boot/grub/stage2 of=/dev/loop0 bs=512 seek=1

#prepare the second disk with GRUB files and directory structure 
mkdir $ACE_ROOT/img/mnt/FAT/grub 
cp -f $ACE_ROOT/img/boot/grub/stage1 $ACE_ROOT/img/mnt/FAT/grub/.
cp -f $ACE_ROOT/img/boot/grub/stage2 $ACE_ROOT/img/mnt/FAT/grub/.
cp -f $ACE_ROOT/img/boot/grub/menu.lst $ACE_ROOT/img/mnt/FAT/grub/.

#all done - unmount the disks 
umount $ACE_ROOT/img/mnt/FAT 

#removing the loopback devices
losetup -d /dev/loop0
losetup -d /dev/loop1

#rename the FAT to floppy
mv $ACE_ROOT/img/FAT.ima $ACE_ROOT/img/floppy.ima

#creating hardisk
bximage -q -hd -size=20 -mode=flat c.img
bximage -q -hd -size=20 -mode=flat d.img
#create filesystem in the harddisk  (ace supports only FAT)
mkdosfs c.img
mkdosfs d.img<commit_msg>Changing hard-disk size from 20 to 3 MB to facilitate working from USB.<commit_after>#! /bin/sh
if test -z "$ACE_ROOT"
then 
	echo "Set the ACE_ROOT environment variable first"
	exit
else
	echo "ACE_ROOT=$ACE_ROOT"
fi

#raw.ima - temporary grub disk. FAT.ima - Grub with FAT FS 
bximage -fd -q -size=1.44 $ACE_ROOT/img/raw.ima 
bximage -fd -q -size=1.44 $ACE_ROOT/img/FAT.ima 

#setting loopback device.
losetup /dev/loop0 $ACE_ROOT/img/raw.ima
losetup /dev/loop1 $ACE_ROOT/img/FAT.ima

#mount the images
mkdosfs /dev/loop1
mkdir -p $ACE_ROOT/img/mnt/FAT
mount -t msdos /dev/loop1  $ACE_ROOT/img/mnt/FAT

#create temp grub disk in raw format 
dd if=$ACE_ROOT/img/boot/grub/stage1 of=/dev/loop0 bs=512 count=1
dd if=$ACE_ROOT/img/boot/grub/stage2 of=/dev/loop0 bs=512 seek=1

#prepare the second disk with GRUB files and directory structure 
mkdir $ACE_ROOT/img/mnt/FAT/grub 
cp -f $ACE_ROOT/img/boot/grub/stage1 $ACE_ROOT/img/mnt/FAT/grub/.
cp -f $ACE_ROOT/img/boot/grub/stage2 $ACE_ROOT/img/mnt/FAT/grub/.
cp -f $ACE_ROOT/img/boot/grub/menu.lst $ACE_ROOT/img/mnt/FAT/grub/.

#all done - unmount the disks 
umount $ACE_ROOT/img/mnt/FAT 

#removing the loopback devices
losetup -d /dev/loop0
losetup -d /dev/loop1

#rename the FAT to floppy
mv $ACE_ROOT/img/FAT.ima $ACE_ROOT/img/floppy.ima

#creating hardisk
bximage -q -hd -size=3 -mode=flat c.img
bximage -q -hd -size=3 -mode=flat d.img
#create filesystem in the harddisk  (ace supports only FAT)
mkdosfs c.img
mkdosfs d.img
{'fraction_non_alphanumeric': 0.12569060773480664, 'fraction_numerical': 0.02106353591160221, 'mean_word_length': 3.695299837925446, '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': '6301161', 'n_tokens_mistral': 1283, 'n_tokens_neox': 1219, 'n_words': 317}