mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-05 01:55:52 +00:00
61db71a198
as "FreeBSD". Check for a conflicting Modula-3 port before installing. Install the copyright notice into a different place.
19 lines
521 B
Bash
19 lines
521 B
Bash
#! /bin/sh
|
|
#
|
|
# check_conflicts - Checks for an SRC modula-3-lib port
|
|
# installed into the same PREFIX.
|
|
|
|
portnames=$(pkg_info -aI | sed -n -e '/^modula-3-/s/[ ].*$//p')
|
|
for port in ${portnames}; do
|
|
prefixes=$(pkg_info -p ${port} |\
|
|
sed -n -e 's/^[ ]*CWD to \([^ ]*\).*$/\1/p')
|
|
for prefix in ${prefixes}; do
|
|
if [ X${prefix} = X${PREFIX} ]; then
|
|
echo "This port conflicts with your installed \"${port}\" port."
|
|
echo "Please remove \"${port}\" before continuing."
|
|
exit 1;
|
|
fi
|
|
done
|
|
done
|
|
exit 0
|