summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2005-08-12 04:35:27 +0000
committercperciva <cperciva@FreeBSD.org>2005-08-12 04:35:27 +0000
commitb415e0b0dd2bf0028a13074299bc0b407934ad81 (patch)
tree8c21e8a77c98227ee8e6398d1559be1568a3dfdf
parenta0f768a4ddf4a419957ecffc684f7d211ebf2326 (diff)
downloadFreeBSD-src-b415e0b0dd2bf0028a13074299bc0b407934ad81.zip
FreeBSD-src-b415e0b0dd2bf0028a13074299bc0b407934ad81.tar.gz
When using cmp(1) to determine if the ports tree is already up to date,
we want the exit code, but not the actual output; add a redirect to /dev/null. Pointy hat to: cperciva
-rw-r--r--usr.sbin/portsnap/portsnap/portsnap.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/portsnap/portsnap/portsnap.sh b/usr.sbin/portsnap/portsnap/portsnap.sh
index 7ff1f6b..a30c11b 100644
--- a/usr.sbin/portsnap/portsnap/portsnap.sh
+++ b/usr.sbin/portsnap/portsnap/portsnap.sh
@@ -803,7 +803,8 @@ update_run() {
return 0
fi
- if sort ${WORKDIR}/INDEX | cmp ${PORTSDIR}/.portsnap.INDEX -; then
+ if sort ${WORKDIR}/INDEX |
+ cmp ${PORTSDIR}/.portsnap.INDEX - >/dev/null; then
echo "Ports tree is already up to date."
return 0
fi
OpenPOWER on IntegriCloud