2023-10-09 19:29:22 +00:00
|
|
|
diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py
|
2024-06-05 15:53:02 +00:00
|
|
|
index 58cedb7..89e77a4 100755
|
2021-09-26 12:46:18 +00:00
|
|
|
--- a/auto_cpufreq/core.py
|
|
|
|
+++ b/auto_cpufreq/core.py
|
2024-06-05 15:53:02 +00:00
|
|
|
@@ -136,26 +136,8 @@ except PermissionError:
|
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
# display running version of auto-cpufreq
|
|
|
|
def app_version():
|
2024-06-05 15:53:02 +00:00
|
|
|
-
|
2023-10-09 19:29:22 +00:00
|
|
|
- print("auto-cpufreq version: ", end="")
|
2024-06-05 15:53:02 +00:00
|
|
|
-
|
2021-09-26 12:46:18 +00:00
|
|
|
- # snap package
|
|
|
|
- if os.getenv("PKG_MARKER") == "SNAP":
|
2024-06-05 15:53:02 +00:00
|
|
|
- print(getoutput(r"echo \(Snap\) $SNAP_VERSION"))
|
2021-09-26 12:46:18 +00:00
|
|
|
- # 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:
|
2023-10-09 19:29:22 +00:00
|
|
|
- print(get_formatted_version())
|
2021-09-26 12:46:18 +00:00
|
|
|
- else:
|
|
|
|
- print(getoutput("pacman -Qi auto-cpufreq | grep Version"))
|
|
|
|
- else:
|
|
|
|
- # source code (auto-cpufreq-installer)
|
|
|
|
- try:
|
2023-10-09 19:29:22 +00:00
|
|
|
- print(get_formatted_version())
|
2021-09-26 12:46:18 +00:00
|
|
|
- except Exception as e:
|
|
|
|
- print(repr(e))
|
|
|
|
- pass
|
2024-06-05 15:53:02 +00:00
|
|
|
+ print("auto-cpufreq version: @version@")
|
|
|
|
+ print("Git commit: v@version@")
|
|
|
|
|
|
|
|
def check_for_update():
|
|
|
|
# returns True if a new release is available from the GitHub repo
|