Improved auto-cpufreq version detection for aur package
This commit is contained in:
parent
9fcc99d5cd
commit
82b41f4ce2
|
@ -60,16 +60,19 @@ dist_name = distro.id()
|
||||||
# display running version of auto-cpufreq
|
# display running version of auto-cpufreq
|
||||||
def app_version():
|
def app_version():
|
||||||
|
|
||||||
|
aur_pkg_check = call("pacman -Qs auto-cpufreq > /dev/null", shell=True)
|
||||||
|
|
||||||
print("auto-cpufreq version:")
|
print("auto-cpufreq version:")
|
||||||
|
|
||||||
# snap package
|
# snap package
|
||||||
if os.getenv('PKG_MARKER') == "SNAP":
|
if os.getenv('PKG_MARKER') == "SNAP":
|
||||||
print(getoutput("echo Snap: $SNAP_VERSION"))
|
print(getoutput("echo Snap: $SNAP_VERSION"))
|
||||||
# aur package
|
# aur package
|
||||||
elif dist_name in ["arch", "manjaro", "garuda"]:
|
elif dist_name in ["arch", "manjaro", "garuda"]:
|
||||||
try:
|
if aur_pkg_check == 1:
|
||||||
print("pacman -Qi auto-cpufreq* | grep Version")
|
print("Git commit:", check_output(["git", "describe", "--always"]).strip().decode())
|
||||||
except:
|
else:
|
||||||
pass
|
print(getoutput("pacman -Qi auto-cpufreq* | grep Version"))
|
||||||
else:
|
else:
|
||||||
# source code (auto-cpufreq-installer)
|
# source code (auto-cpufreq-installer)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue