aboutsummaryrefslogtreecommitdiff
path: root/Tools/scripts
diff options
context:
space:
mode:
authorOliver Eikemeier <eik@FreeBSD.org>2004-03-28 19:13:34 +0000
committerOliver Eikemeier <eik@FreeBSD.org>2004-03-28 19:13:34 +0000
commit74123e97337584674014334175bc8e62d9aa1505 (patch)
treee03564153436ebe244e73981fb97814f2991bd13 /Tools/scripts
parent8c61ccc7c3552b2584b55bcba61e149e80472d3f (diff)
downloadports-74123e97337584674014334175bc8e62d9aa1505.tar.gz
ports-74123e97337584674014334175bc8e62d9aa1505.zip
Notes
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-xTools/scripts/chkorigin.sh29
1 files changed, 27 insertions, 2 deletions
diff --git a/Tools/scripts/chkorigin.sh b/Tools/scripts/chkorigin.sh
index f563407e65e7..c770f1f75e8f 100755
--- a/Tools/scripts/chkorigin.sh
+++ b/Tools/scripts/chkorigin.sh
@@ -46,7 +46,26 @@
# [env PORTSDIR=/usr/ports] chkorigin.sh [category ...]
#
-echo "checking categories for ports with a wrong PKGORIGIN"
+opt_verbose=false
+opt_quiet=false
+
+while getopts vq opt; do
+ case "$opt" in
+ q)
+ opt_quiet=true;;
+ v)
+ opt_verbose=true;;
+ ?)
+ echo "Usage: $0 [-qv] [category ...]"
+ exit 2;;
+ esac
+done
+
+shift $((${OPTIND}-1))
+
+rc=0
+
+$opt_quiet || echo "checking categories for ports with a wrong PKGORIGIN"
cd "${PORTSDIR:=/usr/ports}"
if [ $# -gt 0 ]; then
@@ -66,7 +85,7 @@ for category in ${CATEGORIES}; do
packages) continue ;;
esac
- echo "==> ${category}"
+ $opt_quiet || echo "==> ${category}"
cd "${PORTSDIR}/${category}"
PORTS=`echo *`
@@ -77,11 +96,17 @@ for category in ${CATEGORIES}; do
CVS) continue ;;
pkg) continue ;;
esac
+
+ $opt_verbose && echo "==> ${category}/${port}"
+
cd "${PORTSDIR}/${category}/${port}"
PKGORIGIN=`/usr/bin/make -VPKGORIGIN 2>/dev/null || true"`
if [ "${PKGORIGIN}" != "${category}/${port}" ]; then
echo "port \"${category}/${port}\" has the wrong PKGORIGIN \"${PKGORIGIN}\""
+ rc=1
fi
done
done
+
+return ${rc}