-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·45 lines (37 loc) · 1002 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
# This build script used to make your life easier (except for fish shell...)
dotnet build
if [ $? -ne 0 ]; then
exit 1
fi
if [[ $1 == "-run" ]]; then
echo "Press Ctrl+Z or Ctrl+C to terminate the process..."
if [[ ! -z $2 ]]; then
VirtualBoxVM --startvm $2
exit 0
else
VirtualBoxVM --startvm 'CosmosCs'
exit 0
fi
fi
pushd ./bin/cosmos/Debug/net6.0
if [[ ! -d "iso" ]]; then
mkdir -p iso/boot/grub
fi
cp ./TerminalOS_L.bin ./iso/boot/TerminalOS_L.bin
if [[ ! -f "iso/boot/grub/grub.cfg" ]]; then
echo "set default = 0" >> iso/boot/grub/grub.cfg
echo "set timeout = 0" >> iso/boot/grub/grub.cfg
echo "menuentry \"TerminalOS_L C#\" {" >> iso/boot/grub/grub.cfg
echo " multiboot2 /boot/TerminalOS_L.bin" >> iso/boot/grub/grub.cfg
echo " boot" >> iso/boot/grub/grub.cfg
echo "}" >> iso/boot/grub/grub.cfg
fi
if [ $? -ne 0 ]; then
exit 1
fi
grub-mkrescue -o TerminalOS_L.grub.iso ./iso
if [ $? -ne 0 ]; then
exit 1
fi
popd