Ports installation automation script

Hi guys,

I'm trying to automate the ports installation process on my server using a shell script. But there's a little problem here that some ports offer some options during installation which the user must decide about. e.g. nano. How can I force installation to do the process with defaults? Or any other ideas to omit need of user decisions during installation?
 
You can configure a port and all of its dependencies with one command: make config-recursive. Pretty useful for large ports:

cd /usr/ports/x11/kde4
make config-recursive
make install clean

But if you really want to build a port with default options, simply define the BATCH variable.

cd /usr/ports/x11/xorg
make -DBATCH install clean

See the ports(7)() for other useful targets and variables. Another option is portmaster. portmaster is a small port (but a large shell script) which you can manage (install, remove, upgrade, etc) your ports with that.

cd /usr/ports/ports-mgmt/portmaster
make install clean
man portmaster
 
Thanks
I also found -DBATCH option.
# cd /usr/ports/editors/nano
# make -DBATCH install clean
 
Back
Top