Skip to content

Commit

Permalink
Merge pull request #1 from Domaman202/master
Browse files Browse the repository at this point in the history
Поддержка Arch Linux в системе сборки
  • Loading branch information
0Nera authored Oct 22, 2023
2 parents 02a31cd + 5c3d1ff commit c558657
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ chmod +x build.sh
./build.sh
```

### ArchLinux

```bash
yay -S clang-format
sudo pacman -S python3 git qemu-system-x86
git clone https://git.synapseos.ru/Aren/BMOSP.git
cd BMOSP/
chmod +x build.sh
./build.sh
```

## Запук

### Qemu
Expand Down
24 changes: 22 additions & 2 deletions pbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,23 @@ def check_limine():
os.chdir("..")



def check_os():
import platform
using_distro = False
try:
import distro
using_distro = True
except ImportError:
pass
if using_distro:
linux_distro = distro.like()
else:
linux_distro = platform.linux_distribution()[0]
if linux_distro.lower() in ['debian', 'ubuntu']:
return 1
return 0

def check_tools():
required_tools = ["gcc", "g++", "xorriso", "make", "mtools", "curl"]
missing_tools = []
Expand All @@ -102,7 +119,10 @@ def check_tools():
missing_tools.append(tool)

if len(missing_tools) > 0:
subprocess.run(["sudo", "apt", "install"] + missing_tools)
if check_os():
subprocess.run(["sudo", "apt", "install"] + missing_tools)
return
subprocess.run(["sudo", "pacman", "-S"] + missing_tools)


def create_hdd(IMAGE_NAME):
Expand Down Expand Up @@ -164,4 +184,4 @@ def create_iso(IMAGE_NAME):
create_iso("bmosp")
create_hdd("bmosp")

print(f"Не забудьте сохранить изменения! Номер сборки: {major}.{minor}.{build}")
print(f"Не забудьте сохранить изменения! Номер сборки: {major}.{minor}.{build}")

0 comments on commit c558657

Please sign in to comment.