summarylogtreecommitdiffstats
path: root/terminal-headers.install
blob: c732abb51c33fda398b2cd4721c6a78a500d6c58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
post_install() {
 echo -e "\n\n\e[1;32m[+]\e[0;1;37m  Add one of the header scripts to your shells rc file to\
 apply it upon opening a terminal.\e[1;32m\n\n[+]\e[0;1;37m  Scripts located in\e[0;1;33m\
 '/opt/terminal-headers'\e[0m\n\n"

 ls /opt/terminal-headers | grep "Header$" | while read -r HEADER ; do
   echo -e "\e[1;32m[+] \e[37mLinking \e[36m"$HEADER" \e[37mto /bin/$HEADER";
   ln -s /opt/terminal-headers/$HEADER /usr/bin/$HEADER >/dev/null 2>&1
 done
}

post_upgrade() {
  post_install
}

pre_remove() {
  ls /opt/terminal-headers | grep "Header$" | while read -r HEADER ; do
    echo -e "\e[1;31m[-] \e[37mRemoving \e[36m"$HEADER"'s \e[37msymbolic link from /usr/bin"
    rm /usr/bin/$HEADER >/dev/null 2>&1
  done
}