WKern
Loading...
Searching...
No Matches
frules.py
Go to the documentation of this file.
17
18import subprocess
19from bfiles.files import *
20import os
21from pathlib import Path
22from datetime import datetime
23from bfiles.toolsflags import *
24def fmt():
25 os.chdir(Path(__file__).resolve().parents[1])
26 subprocess.run(["clang-format", "-i", *SRCS, *HEADS])
27
28def git():
29 os.chdir(Path(__file__).resolve().parents[1])
30 subprocess.run(["./loc.sh"])
31 subprocess.run(["git", "add", "."])
32 subprocess.run(["git", "commit", "-m", "Updated at: " + datetime.now().strftime("%H:%M:%S")])
33 subprocess.run(["git", "push", "origin", "main"])
34
35def run():
36 os.chdir(Path(__file__).resolve().parents[1])
37 subprocess.run([QEMU, *QEMUFLAGS])
38
39def chkm():
40 os.chdir(Path(__file__).resolve().parents[1])
41 try:
42 subprocess.run(["i686-elf-grub-file", "--is-x86-multiboot", "kernel.elf"], check=True)
43 except subprocess.CalledProcessError:
44 print("Invalid multiboot header")
run()
Definition frules.py:35
git()
Definition frules.py:28
chkm()
Definition frules.py:39
fmt()
Definition frules.py:24