summarylogtreecommitdiffstats
path: root/retroarch-standalone.install
blob: afbcf45038a6c3a5222c654b549ca31f41a1a407 (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
post_install() {
  # Update systemd sysusers
  systemd-sysusers

  # Create Home folder
  mkdir -p /home/retroarch

  # Create Cache directory
  mkdir -p /home/retroarch/.cache

  # Fix permissions
  chown -R retroarch:retroarch /home/retroarch

  # Swap configuration if it doesn't exist
  if [ ! -f /etc/retroarch-standalone.cfg ]; then
    mv /etc/retroarch-standalone.cfg.pacsave \
      /etc/retroarch-standalone.cfg 2> /dev/null
  fi

  # Print additional useful informations
  echo "==> [WARNING] If your audio is not working, please check [ audio_device = '' ] setting in your cfg!"
  echo "==> [INFO] To run Retroarch everytime at boot please run ==> systemctl enable retroarch-standalone.service"
  echo "==> [INFO] To simply start Retroarch just run ==> systemctl start retroarch-standalone.service"
}

post_upgrade() {
  # Update systemd sysusers
  systemd-sysusers

  # Fix permissions
  chown -R retroarch:retroarch /home/retroarch

  # Swap configuration if it doesn't exist
  if [ ! -f /etc/retroarch-standalone.cfg ]; then
    mv /etc/retroarch-standalone.cfg.pacsave \
      /etc/retroarch-standalone.cfg 2> /dev/null
  fi
}