Backup dotfiles

This commit is contained in:
Ano-sys
2025-01-15 01:39:27 +01:00
commit cbe4355c3d
256 changed files with 4725 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import os
from ignis.utils import Utils
EXPECT_VERSION = ["0", "2"]
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
SKIP_VER_CHECK = os.getenv("SKIP_VER_CHECK")
BYPASS_VER_MESSAGE = "To bypass this check set SKIP_VER_CHECK=1 env var."
def check_version() -> None:
if SKIP_VER_CHECK == "1":
return
VERSION = Utils.get_ignis_version().replace("dev0", "").split(".")
if int(VERSION[0]) < int(EXPECT_VERSION[0]) or int(VERSION[1]) < int(
EXPECT_VERSION[1]
):
print(
f"ERROR: My dotfiles requires at least Ignis v{'.'.join(EXPECT_VERSION)}, current version: v{'.'.join(VERSION)}. {BYPASS_VER_MESSAGE}"
)
exit(1)