summarylogtreecommitdiffstats
path: root/vmware-horizon-client.install
blob: 01fd22e08d5a0ff0f964050190a31be3714d90ac (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
#!/bin/sh

EULA() {
  echo " > By installing this package you acknowledge that you agree to the End-User"
  echo " > License Agreement (EULA) found in /usr/share/doc/vmware-horizon-client/."
  echo " > If you do not agree to VMware EULA remove this package immediately:"
  echo " >  $ pacman -Rc vmware-horizon-client"
}

hosts_add() {
  if ! grep -q 'view-localhost' /etc/hosts; then
    echo '127.0.0.2 view-localhost # added by vmware-horizon-client' >> /etc/hosts
  fi
}

hosts_remove() {
  sed -i '/view-localhost/d' /etc/hosts
}

post_install() {
  EULA
  hosts_add
}

post_upgrade() {
  hosts_add
}

post_remove() {
  hosts_remove
}