summaryrefslogtreecommitdiff
path: root/floppy/SConscript
blob: 2021b18032e68e55e0fbdaf3224a1ed0cdc3c697 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Import('env')

env = env.Clone(
	BASE_IMAGE = File('empty.img').path,
	MOUNTPOINT = Dir('mountpoint').path,
	GRUB_CONF = File('grub.conf').path,
)

floppy = env.Command(
	'floppy.img',
	['#kernel/kernel'],
	[
		'cp $BASE_IMAGE $TARGET',
		'mkdir $MOUNTPOINT',
		'hdiutil attach -quiet -mountpoint $MOUNTPOINT $TARGET',
		'cp $SOURCE $MOUNTPOINT/',
		'cp $GRUB_CONF $MOUNTPOINT/boot/grub/',
		'hdiutil detach -quiet $MOUNTPOINT',
		'rmdir $MOUNTPOINT',
	]
)

Depends(floppy, 'empty.img')
Depends(floppy, 'grub.conf')