added app_version to non snap env
This commit is contained in:
parent
7f0ad729c9
commit
d3a767626a
|
@ -35,6 +35,7 @@ def main(monitor, live, daemon, install, log, debug):
|
||||||
if os.getenv("PKG_MARKER") == "SNAP" and dcheck == "enabled":
|
if os.getenv("PKG_MARKER") == "SNAP" and dcheck == "enabled":
|
||||||
while True:
|
while True:
|
||||||
root_check()
|
root_check()
|
||||||
|
footer()
|
||||||
gov_check()
|
gov_check()
|
||||||
cpufreqctl()
|
cpufreqctl()
|
||||||
distro_info()
|
distro_info()
|
||||||
|
@ -90,9 +91,11 @@ def main(monitor, live, daemon, install, log, debug):
|
||||||
root_check()
|
root_check()
|
||||||
footer()
|
footer()
|
||||||
distro_info()
|
distro_info()
|
||||||
|
print("")
|
||||||
if os.getenv('PKG_MARKER') == "SNAP":
|
if os.getenv('PKG_MARKER') == "SNAP":
|
||||||
print("Snap package: yes")
|
print("Snap package: yes")
|
||||||
else:
|
else:
|
||||||
|
app_version()
|
||||||
print("Snap package: no")
|
print("Snap package: no")
|
||||||
print("")
|
print("")
|
||||||
python_info()
|
python_info()
|
||||||
|
|
|
@ -12,7 +12,7 @@ import warnings
|
||||||
from math import isclose
|
from math import isclose
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from pprint import pformat
|
from pprint import pformat
|
||||||
from subprocess import getoutput, call, run
|
from subprocess import getoutput, call, run, check_output
|
||||||
|
|
||||||
import psutil
|
import psutil
|
||||||
import distro
|
import distro
|
||||||
|
@ -30,6 +30,9 @@ SCRIPTS_DIR = Path("/usr/local/share/auto-cpufreq/scripts/")
|
||||||
ALL_GOVERNORS = ("performance", "ondemand", "conservative", "schedutil", "userspace", "powersave")
|
ALL_GOVERNORS = ("performance", "ondemand", "conservative", "schedutil", "userspace", "powersave")
|
||||||
CPUS = os.cpu_count()
|
CPUS = os.cpu_count()
|
||||||
|
|
||||||
|
# ToDo: read version from snap/snapcraft.yaml and write to $SNAP/version for use with snap installs
|
||||||
|
def app_version():
|
||||||
|
print("Build git commit:", check_output(["git", "describe", "--always"]).strip().decode())
|
||||||
|
|
||||||
def turbo(value: bool = None):
|
def turbo(value: bool = None):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue