Print this page
buildctl should honor opts and pass them to build.sh scripts

@@ -1,9 +1,10 @@
 #!/usr/bin/bash
 
 NOBANNER=1
 batch_flag=""
+lint_flag=""
 if [ "${BATCH}" = 1 ]; then
     echo "Enabling batch mode."
     batch_flag="-b"
 fi
 . ../lib/functions.sh

@@ -116,11 +117,11 @@
                 pkgsend -s $PKGSRVR publish $SCRIPT.final || \
                     bail "pkgsend failed"
                 rm $SCRIPT.final
             fi
         else
-            PATH=$PATH:. $SCRIPT -r $PKGSRVR $batch_flag || \
+            PATH=$PATH:. $SCRIPT -r $PKGSRVR $batch_flag $lint_flag || \
                 logerr "Unable to run $SCRIPT"
         fi
     popd >/dev/null
 }
 

@@ -146,10 +147,22 @@
 }
 
 DEFAULT_PKGSRVR=$PKGSRVR
 DEFAULT_PKGPUBLISHER=$PKGPUBLISHER
 
+# When we get here, honor any -l or -b flags from the buildctl command line,
+# or even the environment.
+
+if [ "${BATCH}" = 1 ]; then
+    logmsg "Enabling batch mode."
+    batch_flag="-b"
+fi
+if [ "${SKIP_PKGLINT}" = 1 ]; then
+    logmsg "Disabling pkglint."
+    lint_flag="-l"
+fi
+
 case "$1" in
     list)
         list $2
         exit
         ;;