Pi66

pino
Python notification daemon.
git clone https://git.pi66.xyz/pino

← back to log

Updated install

author: pixel2175
date: 2024-12-25 17:48
hash: 20b11fc4196c178cebf6c33c60b4186d639ff674

Diffstat:

M

install.py
12 ++++++++++++++++++++----------

M

uninstall.py
8 ++++++++++----------
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
diff --git a/install.py b/install.py
index 2ce1de9..79e1c2f 100644
--- a/install.py
+++ b/install.py
@@ -38,7 +38,7 @@ def install_system_deps():
     elif distro in ["centos", "rhel"]:
         os.system("sudo yum install -y python3 tk > /dev/null 2>&1")
         print("[*]- Dependencies: Done")
-    elif distro == "arch":
+    elif distro == "arch" or distro == "artix":
         os.system("sudo pacman -S --noconfirm python3 tk > /dev/null 2>&1")
         print("[*]- Dependencies: Done")
     elif distro == "void":
@@ -51,6 +51,7 @@ def install_system_deps():
             "[*]- Unsupported distribution. Please install system dependencies manually.\n  [*]- dependencies:\n\t-python\n\t-tk\n\t-python-tkinter "
         )

+
 def copy_file():
     try:
         os.system("cp ./src/pino.py pino > /dev/null 2>&1")
@@ -63,7 +64,9 @@ def copy_file():

         if not os.path.exists("/etc/pino"):
             os.system("sudo mkdir /etc/pino")
-        os.system(f"sudo chown -R {os.getlogin()}:{grp.getgrgid(os.getgid()).gr_name} /etc/pino/ > /dev/null 2>&1")
+        os.system(
+            f"sudo chown -R {os.getlogin()}:{grp.getgrgid(os.getgid()).gr_name} /etc/pino/ > /dev/null 2>&1"
+        )
         os.system("sudo cp -r lib /etc/pino > /dev/null 2>&1")
     except OSError as e:
         print("Installing app failed\ncheck app_install_error.txt file for more info")
@@ -73,7 +76,9 @@ def copy_file():
         if not os.path.exists("~/.config/pino"):
             os.makedirs(os.path.expanduser("~/.config/pino/plugs/"), exist_ok=True)
         os.system("cp ./plugs/* ~/.config/pino/plugs/ > /dev/null 2>&1")
-        os.system("sudo cp ./src/config.json ./src/notification.wav /etc/pino/ > /dev/null 2>&1")
+        os.system(
+            "sudo cp ./src/config.json ./src/notification.wav /etc/pino/ > /dev/null 2>&1"
+        )
         os.system("cp /etc/pino/* ~/.config/pino/ > /dev/null 2>&1")
         print("\n[*]- Done")
     except OSError as e:
@@ -81,6 +86,5 @@ def copy_file():
         os.system(f"echo {e} > config_error.txt")


-
 install_system_deps()
 copy_file()
diff --git a/uninstall.py b/uninstall.py
index 61b632f..d875d75 100644
--- a/uninstall.py
+++ b/uninstall.py
@@ -32,16 +32,16 @@ def remove_system_deps():
     elif distro in ["centos", "rhel"]:
         os.system("sudo yum remove  -y tk > /dev/null 2>&1")
         print("Remove System Dep: Done")
-    elif distro == "arch":
+    elif distro == "arch" or distro == "artix":
         os.system("sudo pacman -Rns --noconfirm tk > /dev/null 2>&1")
         print("Remove System Dep: Done")
     elif distro == "void":
         os.system("sudo xbps-remove -R -y python3-tkinter tk > /dev/null 2>&1")
         print("Remove System Dep: Done")
     else:
-        print("Unsupported distribution. Please install system dependencies manually.")
-
-
+        print(
+            "Unsupported distribution. Please uninstall system dependencies manually."
+        )


 def remove_files():