terminal-headers


Logs | Files | LICENSE | GitLab


1
commit 2497739b3bcc800da9e6d6e448d2629d4ce02dc3
2
Author: Connor Etherington <[email protected]>
3
Date:   Fri Jun 3 16:48:51 2022 +0200
4
5
    Auto-Commit Update - 20220603
6
---
7
 PKGBUILD                 |  2 +-
8
 terminal-headers.install | 25 +++++++++++++++++++++++--
9
 2 files changed, 24 insertions(+), 3 deletions(-)
10
11
diff --git a/PKGBUILD b/PKGBUILD
12
index dcc6123..1a95838 100644
13
--- a/PKGBUILD
14
+++ b/PKGBUILD
15
@@ -3,7 +3,7 @@
16
 pkgname=terminal-headers
17
 pkgver=1.2
18
 pkgrel=1
19
-pkgdesc='Scripts providing a fun and colorful greeting when opening a terminal'
20
+pkgdesc='Color scripts providing a fun greeting when opening a terminal or reloading your shell'
21
 install=terminal-headers.install
22
 arch=(x86_64)
23
 url="https://gitlab.com/a4to/${pkgname}"
24
diff --git a/terminal-headers.install b/terminal-headers.install
25
index f0607fb..99f88cd 100644
26
--- a/terminal-headers.install
27
+++ b/terminal-headers.install
28
@@ -1,7 +1,28 @@
29
 post_install() {
30
   
31
-  echo -e "\n\e[1;33m[+]\e[0;1;32m  Add one of the header scripts to your shells rc file to apply it upon opening a terminal\e[0m\n"
32
+echo -e "\n\n\e[1;33m[+]\e[0;1;32m  Add one of the header scripts to your shells rc file to\
33
+ apply it upon opening a terminal.\e[1;33m\n\n[+]\e[0;1;32m  Scripts located in\e[0;1;35m\
34
+ '/opt/terminal-headers'\e[0m\n\n" 
35
 
36
-  for x in `ls '/opt/terminal-headers'` ; do ln -s /opt/terminal-headers/$x /usr/bin/$x ; done
37
+for x in `ls '/opt/terminal-headers'` ; do 
38
+  ln -s /opt/terminal-headers/$x /usr/bin/$x >/dev/null 2>&1
39
+done
40
+
41
+for x in `ls '/opt/terminal-headers'` ; do 
42
+  ln -s /opt/terminal-headers/$x /usr/bin/$x >/dev/null 2>&1
43
+done
44
 
45
 }
46
+
47
+pre_remove() {
48
+  
49
+ls /opt/terminal-headers | grep "Header$" | while read -r HEADER ; do
50
+
51
+echo -e "\e[1;31m[-]  \e[37mRemoving \e[36m"$HEADER"'s \e[37msymbolic link from /usr/bin"
52
+
53
+rm /usr/bin/$HEADER >/dev/null 2>&1
54
+
55
+done
56
+
57
+}
58
+