-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathbuild_and_run.sh
More file actions
45 lines (37 loc) Β· 956 Bytes
/
Copy pathbuild_and_run.sh
File metadata and controls
45 lines (37 loc) Β· 956 Bytes
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
45
#!/bin/bash
echo "π rou2exOS Build and Run Script"
echo "================================"
# 1. Build Docker image
echo "π¦ Building Docker image..."
docker build -t rou2exos-builder .
if [ $? -ne 0 ]; then
echo "β Docker build failed"
exit 1
fi
# 2. Run container and copy ISO
echo "π Copying ISO file..."
docker run --rm -v $(pwd):/host rou2exos-builder bash -c "
if [ -f r2.iso ]; then
cp r2.iso /host/
echo 'β
ISO file copied successfully: r2.iso'
exit
else
echo 'β ISO file not found'
ls -la
exit 1
fi
"
if [ $? -ne 0 ]; then
echo "β ISO copy failed"
exit 1
fi
# 3. Verify ISO file exists
if [ ! -f "r2.iso" ]; then
echo "β r2.iso file not found"
exit 1
fi
# 4. Run QEMU
echo "π₯οΈ Running rou2exOS with QEMU..."
echo "To exit: Press Ctrl+Alt+G, then type 'quit' in QEMU monitor"
qemu-system-x86_64 -boot d -cdrom r2.iso
echo "β
Done!"