summarylogtreecommitdiffstats
path: root/filebot.install
blob: 6ecba9c7b6f8a8ca24338b6d20b9492c4f859009 (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
# vim: set syntax=bash :
pre_install () {
if [ -d "/usr/share/filebot/openjfx" ]; then
  if [ -L "/usr/share/filebot/openjfx" ]; then
    echo "Installing"
  else
    echo "Removing /usr/share/filebot/openjfx directory leftover"
    rm -r /usr/share/filebot/openjfx
  fi
fi
}

post_install() {
  echo -e "\e[1;33m==>\e[0m Symlinking OpenJFX"

  ln -sf /usr/lib/jvm/java-11-openjfx/lib/ /usr/share/filebot/openjfx

  echo ""
  echo -e "\e[1;33m==>\e[0m \e[1;31m filebot --license license.file \e[0m will activate your license.file"
  echo ""

  echo -e "\e[1;33m==>\e[0m To enable system extractor for archives please run"
  echo ""
  echo -e "\e[1;33m==>\e[0m \e[1;31m filebot -script fn:properties --def net.filebot.archive.extractor=ShellExecutables \e[0m"
  echo ""
}

pre_upgrade () {
  pre_install "${1}"
}

post_upgrade() {
  post_install "${1}"
}

pre_remove() {
  echo -e "\e[1;33m==>\e[0m Removing OpenJFX symlinks leftover"
  rm /usr/share/filebot/openjfx
}