From owner-svn-ports-head@freebsd.org Thu Mar 17 13:18:23 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 303F6AD3558; Thu, 17 Mar 2016 13:18:23 +0000 (UTC) (envelope-from marino@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 017D5ACC; Thu, 17 Mar 2016 13:18:22 +0000 (UTC) (envelope-from marino@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2HDIMlb016257; Thu, 17 Mar 2016 13:18:22 GMT (envelope-from marino@FreeBSD.org) Received: (from marino@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2HDIMQV016256; Thu, 17 Mar 2016 13:18:22 GMT (envelope-from marino@FreeBSD.org) Message-Id: <201603171318.u2HDIMQV016256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marino set sender to marino@FreeBSD.org using -f From: John Marino Date: Thu, 17 Mar 2016 13:18:22 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r411283 - head/Tools/scripts X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2016 13:18:23 -0000 Author: marino Date: Thu Mar 17 13:18:21 2016 New Revision: 411283 URL: https://svnweb.freebsd.org/changeset/ports/411283 Log: redundant-opt-files.sh script: validate PORTSDIR value Before checking validity of $db_dir, verify $portdir is valid and eject if it is not. This provides a better error message when PORTSDIR is invalid. Modified: head/Tools/scripts/redundant-opt-files.sh Modified: head/Tools/scripts/redundant-opt-files.sh ============================================================================== --- head/Tools/scripts/redundant-opt-files.sh Thu Mar 17 13:07:50 2016 (r411282) +++ head/Tools/scripts/redundant-opt-files.sh Thu Mar 17 13:18:21 2016 (r411283) @@ -9,6 +9,12 @@ # deleted in order to prevent future configuration check failures. portsdir=${PORTSDIR:-/usr/ports} +if [ ! -d "${portsdir}" ]; then + echo "The ${portsdir} ports directory does not exist" + echo "There is nothing more to do." + exit +fi + db_dir=$(/usr/bin/make -C ${portsdir}/devel/gmake -V PORT_DBDIR 2>/dev/null) if [ ! -d "${db_dir}" ]; then