summaryrefslogtreecommitdiff
path: root/pcr/recutils/recutils.install
blob: 245c7ae01664280ad1c135e70dd5ce400462b95a (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
_infodir=/usr/share/info
_infofiles=( recutils.info.gz )

_mandir=/usr/share/man/man1
_manfiles=( csv2rec.1.gz rec2csv.1.gz recdel.1.gz recfix.1.gz recfmt.1.gz recinf.1.gz recins.1.gz recsel.1.gz recset.1.gz)

## arg 1:  the new package version
post_install() {
  [ -x /usr/bin/mandb ] || return 0
  for _file in ${_manfiles[@]}; do
    mandb -f $_mandir/$_file
  done

  [ -x /usr/bin/install-info ] || return 0
  for _file in ${_infofiles[@]}; do
    install-info $_infodir/$_file $_infodir/dir #2> /dev/null
  done
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
    post_install $1
}

pre_remove() {
  [ -x /usr/bin/mandb ] || return 0
  mandb

  [ -x /usr/bin/install-info ] || return 0
  for _file in ${_infofiles[@]}; do
    install-info --delete $_infodir/$_file $_infodir/dir #2> /dev/null
  done
}

# vim:set ts=2 sw=2 et: