v0.0.20 pkgrel 5

Adds a check for all the envvars the package uses.
This commit is contained in:
Fredrick Brennan
2023-06-21 01:50:03 -04:00
parent 20b3c93d78
commit 724f305e6f
5 changed files with 88 additions and 32 deletions

24
sensible-utils.install Normal file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
source /usr/share/sensible-utils/sensible-envvars
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
}
post_upgrade() {
post_install "$@"
}
# vim:set ts=2 sw=2 et: