svn commit: r398929 - head/Mk/Scripts

Bryan Drewery bdrewery at FreeBSD.org
Fri Oct 9 18:13:59 UTC 2015


Author: bdrewery
Date: Fri Oct  9 18:13:57 2015
New Revision: 398929
URL: https://svnweb.freebsd.org/changeset/ports/398929

Log:
  Make missing argument less obscure.
  
  With hat:	portmgr

Modified:
  head/Mk/Scripts/clean-depends-list.sh

Modified: head/Mk/Scripts/clean-depends-list.sh
==============================================================================
--- head/Mk/Scripts/clean-depends-list.sh	Fri Oct  9 18:09:02 2015	(r398928)
+++ head/Mk/Scripts/clean-depends-list.sh	Fri Oct  9 18:13:57 2015	(r398929)
@@ -6,14 +6,15 @@
 
 set -e
 validate_env dp_PKGNAME dp_MAKE dp_PORTSDIR
-set -u
 
 arg=$1
-shift
-if [ "${arg}" != "full" -a "${arg}" != "limited" ]; then
-	echo "the first argument can only be 'full' or 'limited'" >&2
+if [ -z "${arg}" ] || [ "${arg}" != "full" -a "${arg}" != "limited" ]; then
+	echo "The first argument can only be 'full' or 'limited'" >&2
 	exit 1
 fi
+shift
+
+set -u
 
 check_dep() {
 	for _dep ; do


More information about the svn-ports-all mailing list