Skip to content

Commit

Permalink
Add repo cleanliness to sysprofiler
Browse files Browse the repository at this point in the history
  • Loading branch information
Coopydood committed Oct 4, 2024
1 parent 00d4697 commit 2dadfcc
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/changelogs/v0-13-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This update includes the following features / fixes / changes:
- Support for multiple virtual machines under one repo
- Complete rework of core scripts to integrate with NRS
- Better networking setup on new VMs
- Added more system profiler information to reports
- Added warning about Resizeable BAR to VFIO passthrough assistant
- Added and updated documentation
- Updated README gallery screenshots
Expand Down
39 changes: 35 additions & 4 deletions scripts/sysprofiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
depRPC = 0

detectChoice = 1
latestOSName = "Sonoma"
latestOSVer = "14"
latestOSName = "Sequoia"
latestOSVer = "15"

scriptName = "System Profile Tool"
script = "sysprofiler.py"
scriptID = "SPT"
scriptVendor = "Coopydood"
scriptVer = 1.0
scriptVer = 1.1
branch = "Unknown"

version = open("./.version")
Expand Down Expand Up @@ -171,6 +171,7 @@ def cpydProfile(logMsg,warn=None):
ultmosGenVer = "Unknown"
genEpoch = "Unknown"
featureLvl = "Unknown"
upgraded = 0

output_stream = os.popen("git branch --show-current")
branch = output_stream.read()
Expand All @@ -179,6 +180,23 @@ def cpydProfile(logMsg,warn=None):
time.sleep(0.1)
progressUpdate(4)

# Check if repo was ever updated
if os.path.exists("./resources/script_store/.version"):
cloneVer = open("./resources/script_store/.version")
cloneVer = cloneVer.read()
cloneVerN = cloneVer.replace(".","")
versionN = version.replace(".","")
if cloneVerN < versionN:
upgraded = True
else:
upgraded = False

storeList = []
for x in os.listdir("./resources/script_store/"):
if "." in x:
storeList.append(x)
if ".script_store" in storeList: storeList.remove(".script_store")

if os.path.exists("./blobs/user/USR_CFG.apb"):

global macOSVer
Expand Down Expand Up @@ -441,6 +459,19 @@ def cpydProfile(logMsg,warn=None):
warnings.append("is not considered stable and bugs are likely\n")
else:
cpydProfile(("Branch : "+branch))
if upgraded == True:
cpydProfile(("Upgraded : YES"),True) #("+str(cloneVer)+")"),True)
warnings.append(("This copy of the ULTMOS repository was originally cloned"))
warnings.append("on version "+str(cloneVer)+" and updated by the user using RUU\n")

for f in storeList[0:(len(storeList)-1)]:
cpydProfile(" ├ "+f)
cpydProfile(" └ "+storeList[-1])

elif upgraded == False:
cpydProfile(("Upgraded : NO"))
else:
cpydProfile(("Upgraded : UNKNOWN"))
cpydProfile((" \n"))
cpydProfile("OPERATING SYSTEM")
cpydProfile("────────────────────────────────────────────────────────")
Expand Down Expand Up @@ -611,7 +642,7 @@ def cpydProfile(logMsg,warn=None):
cpydProfile(("Kernel : "+"Configured"))
if vfcKernel == 0:
cpydProfile(("Kernel : "+"Misconfigured"),True)
warnings.append("The kernel does not appear to be set up correctly,")
warnings.append("VFIO passthrough unavailable due to kernel setup,")
warnings.append("expected drivers are not available / running\n")
cpydProfile(("Stubbed : "+str(len(pci_ids))))
if len(pci_ids) > 0:
Expand Down

0 comments on commit 2dadfcc

Please sign in to comment.