PKGBUILDs/community/pkgtools/pkgtools.install

53 lines
1.5 KiB
Text
Raw Normal View History

2009-10-10 02:15:33 +00:00
_MSG_UPDATE=" -Make sure to run pkgfile --update before use"
_MSG_CRON=" - An entry has been placed in /etc/cron.daily to run pkgfile --update
If you do not want this functionality, run (as root):
chmod -x /etc/cron.daily/pkgfile"
_MSG_HOOK=" - pkgfile includes a \"command not found\" hook for both zsh and bash.
This will automatically run pkgfile whenever you run
a command which the shell cannot find. If you want
this functionality, set CMD_SEARCH_ENABLED to 1 in
/etc/pkgtools/pkgfile.conf (or per-user by copying
that file to ~/.pkgtools/pkgfile.conf), then
in your current shell run:
. /etc/profile"
_MSG_BUGS=" - Bugs: please report any bugs to the Community bugtracker at
http://bugs.archlinux.org/index.php?project=5"
is_update_from() {
if [ `vercmp $1 $2` -eq -1 ]; then
return 0
fi
return 1
}
## arg 1: the new package version
post_install() {
echo "$_MSG_UPDATE"
echo "$_MSG_HOOK"
echo "$_MSG_CRON"
echo "$_MSG_BUGS"
}
## arg 1: the new package version
## arg 2: the old package version
post_upgrade() {
if is_update_from $2 11-1; then
echo " - All bugs related to pkgfile -b should be fixed in this update."
fi
if is_update_from $2 12-1; then
echo " - NOTE: pkgtools' \"command not found\" hook configuration has changed.
Please remove any old symlinks relating to it."
echo "$_MSG_HOOK"
fi
echo "$_MSG_BUGS"
}
## arg 1: the old package version
post_remove() {
cat << _EOM
- You may want to clean /usr/share/pkgtools/lists
_EOM
}
# vim:set ts=2 sw=2 et filetype=sh: