-
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
/
build_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!"