summarylogtreecommitdiffstats
path: root/sensible-utils.install
blob: 23afbbc10efb79b8ddef4c367363c2c706ec3f2d (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
#!/bin/bash

source /usr/share/sensible-utils/sensible-envvars
source /etc/profile

post_install() {
  for cmd in ${!SENSIBLEENVVARS[*]}; do
    local cmdpath
    cmdpath="$(which $cmd)"
    [[ -n "$cmdpath" ]] || continue
    local envvar
    envvar="${SENSIBLEENVVARS["$cmd"]}"
    if [[ -z "$envvar" ]]; then
      continue
    fi
    [[ -z "${!envvar}" ]] && echo "$cmdpath requires $envvar be set in the environment to work properly!"
  done
  return 0
}

post_upgrade() {
  post_install "$@"
  return $?
}

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