38 lines
1.1 KiB
Diff
38 lines
1.1 KiB
Diff
--- a/auto_cpufreq/core.py
|
|
+++ b/auto_cpufreq/core.py
|
|
@@ -68,32 +68,8 @@ dist_name = distro.id()
|
|
|
|
# display running version of auto-cpufreq
|
|
def app_version():
|
|
-
|
|
- print("auto-cpufreq version:")
|
|
-
|
|
- # snap package
|
|
- if os.getenv("PKG_MARKER") == "SNAP":
|
|
- print(getoutput("echo Snap: $SNAP_VERSION"))
|
|
- # aur package
|
|
- elif dist_name in ["arch", "manjaro", "garuda"]:
|
|
- aur_pkg_check = call("pacman -Qs auto-cpufreq > /dev/null", shell=True)
|
|
- if aur_pkg_check == 1:
|
|
- print(
|
|
- "Git commit:",
|
|
- check_output(["git", "describe", "--always"]).strip().decode(),
|
|
- )
|
|
- else:
|
|
- print(getoutput("pacman -Qi auto-cpufreq | grep Version"))
|
|
- else:
|
|
- # source code (auto-cpufreq-installer)
|
|
- try:
|
|
- print(
|
|
- "Git commit:",
|
|
- check_output(["git", "describe", "--always"]).strip().decode(),
|
|
- )
|
|
- except Exception as e:
|
|
- print(repr(e))
|
|
- pass
|
|
+ print("auto-cpufreq version: @version@")
|
|
+ print("Git commit: v@version@")
|
|
|
|
|
|
def app_res_use():
|