# Install ports quietly



## vist (Nov 16, 2011)

Dear colleagues, please explain me how to install port and all of its dependecies quietly? When installing most of dependent ports I have to config them. Can I use some key that will make the script to work automatically and install dependent port automatically with default (or, for example, maximal) configuration?


----------



## SirDice (Nov 16, 2011)

Set BATCH see ports(7).


----------



## vist (Nov 16, 2011)

Please, explain me how to set BATCH?


----------



## pbd (Nov 16, 2011)

If you are using *csh*/*tcsh*:

`# setenv BATCH 1; make install clean`

If you are using *sh*/*bash*:

`# BATCH=1; make install clean`

Or choose options for all dependencies before building:

`# make config-recursive && make install clean`


----------



## Martillo1 (Nov 16, 2011)

`# make install clean BATCH="YES"`


----------



## vist (Nov 16, 2011)

BATCH will make all dependent ports to install with default settings?


----------



## SirDice (Nov 16, 2011)

vist said:
			
		

> BATCH will make all dependent ports to install with default settings?


Yes, unless the settings have been set previously using config or config-recursive. If there are no previously set options the defaults will be used.

Keep in mind it will also process /etc/make.conf and any options that are turned on on the commandline.

Setting BATCH prevents that OPTION menu from appearing.


----------



## wblock@ (Nov 16, 2011)

Before building, use
`# make config-recursive`
to set all the options at once.  Since options have already been set, they won't appear during the build.


----------



## phoenix (Nov 16, 2011)

Or, use portmaster(8) instead of using the ports tree directly.    It configures all the ports (and dependencies) ahead of time, before starting the actual compiling and installing.  It can be installed from ports-mgmt/portmaster


----------



## Martillo1 (Nov 16, 2011)

There is also an option in ports-mgmt/portupgrade: --batch

`# portinstall --batch [i]portname[/i]`


----------



## vist (Nov 17, 2011)

Thank you for you advice! The problem is solved!


----------

