1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-12 03:00:28 +00:00
freebsd-ports/ports-mgmt/portaudit/pkg-req
2004-07-13 19:36:15 +00:00

33 lines
698 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
case $2 in
INSTALL)
if [ -z "${PKG_INFO}" ]; then
if [ -x "%%LOCALBASE%%/sbin/pkg_info" ]; then
PKG_INFO="%%LOCALBASE%%/sbin/pkg_info"
else
PKG_INFO="/usr/sbin/pkg_info"
fi
fi
if [ ! -x "${PKG_INFO}" ]; then
echo "${PKG_INFO} missing, please install port sysutils/pkg_install-devel"
exit 1
fi
PKG_INSTALL_VER=`${PKG_INFO} -qP 2>/dev/null`
if [ -z "${PKG_INSTALL_VER}" -o "${PKG_INSTALL_VER}" -lt %%REQPKGVER%% ]; then
echo "${PKG_INFO} is too old, please update port sysutils/pkg_install-devel"
exit 1
fi
if [ "`echo FreeBSD | tr -s .`" != "FreeBSD" ]; then
echo "tr(1) is broken."
exit 1
fi
;;
esac