mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 17:07:47 +00:00
Meta: Add lint check that ports have an executable package.sh
This commit is contained in:
parent
e0dce41ddf
commit
5056668ab2
1 changed files with 5 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import stat
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
@ -60,7 +61,7 @@ def read_port_table(filename):
|
||||||
|
|
||||||
|
|
||||||
def read_port_dirs():
|
def read_port_dirs():
|
||||||
"""Check Ports directory for unexpected files and check each port has a package.sh file.
|
"""Check Ports directory for unexpected files and check each port has an executable package.sh file.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
list: all ports (set), no errors encountered (bool)
|
list: all ports (set), no errors encountered (bool)
|
||||||
|
@ -81,6 +82,9 @@ def read_port_dirs():
|
||||||
print(f"Ports/{entry}/ is missing its package.sh?!")
|
print(f"Ports/{entry}/ is missing its package.sh?!")
|
||||||
all_good = False
|
all_good = False
|
||||||
continue
|
continue
|
||||||
|
if not os.stat(entry + '/package.sh')[stat.ST_MODE] & stat.S_IXUSR:
|
||||||
|
print(f"Ports/{entry}/package.sh is not executable?!")
|
||||||
|
all_good = False
|
||||||
ports[entry] = get_port_properties(entry)
|
ports[entry] = get_port_properties(entry)
|
||||||
|
|
||||||
return ports, all_good
|
return ports, all_good
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue