summarylogtreecommitdiffstats
path: root/plymouth-theme-endeavouros.install
blob: 13210bfe1c14c4d51de82f16d578d738cc1bab0e (plain)
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
#Set theme name

name="endeavouros"

post_install() {
  echo 
  echo "Set plymouth theme $name"
  echo

#Change theme name into plymouthd.conf
  sed -i -e "s,.*Theme=.*,Theme=$name," /etc/plymouth/plymouthd.conf

  plymouth-set-default-theme -R $name

  echo
  echo "Done"
  echo 
}

post_upgrade() {

  grep "Theme=$name" /etc/plymouth/plymouthd.conf
  if [ $? -eq 0 ] ; then
       plymouth-set-default-theme -R $name
  fi
}

pre_remove() {
  grep "Theme=$name" /etc/plymouth/plymouthd.conf
  if [ $? -eq 0 ] ; then
  cat << _EOF 
  
==> WARNING: You have removed your current plymouth-theme.
==> Set a different theme with:
==> sudo plymouth-set-default-theme -R <theme-name>
==> or remove Plymouth properly!

_EOF
  fi
}