Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

Commit 0e37b24

Browse files
authored
Fix
1 parent 7090221 commit 0e37b24

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

auroraos.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
if [[ "$1" == "clean" ]]; then
4+
python3 meta/build.py clean
5+
fi
6+
set -e
7+
8+
function is_ubuntu() {
9+
if [ -f /etc/os-release ]; then
10+
grep -q "ubuntu" /etc/os-release
11+
return $?
12+
fi
13+
return 1
14+
}
15+
16+
function is_darwin() {
17+
if [ "$(uname)" == "Darwin" ]; then
18+
return 0
19+
fi
20+
return 1
21+
}
22+
23+
24+
if is_ubuntu; then
25+
echo "Detected Ubuntu, installing dependencies automatically..."
26+
sudo apt-get install gcc g++ qemu-system-i386 python3 -y
27+
elif is_darwin; then
28+
echo "Detected macOS, installing dependencies automatically..."
29+
if ! command -v brew &> /dev/null
30+
then
31+
echo "Homebrew is not installed. Please install Homebrew first."
32+
echo '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"'
33+
exit 1
34+
fi
35+
36+
brew install gcc qemu python3
37+
else
38+
echo "Unsupported OS. Please install dependencies manually."
39+
exit 1
40+
fi
41+
42+
fi
43+
44+
python3 /meta/build.py

0 commit comments

Comments
 (0)