how to pkg install without answering "y/n" by script?

I tried to run a script with a list of pkg install, which stopped on "y/n" waiting for input. I looked for an option to avoid the questions but didn't see any. I'm unsure about "policy", meaning if I pipe "y/ny/ny/n" if that will work and is typical or if some pkg or port also demand keyboard input? I ended up typing it all in by hand.
 
pkg-install(8)
Code:
OPTIONS
      -y, --yes  Assume yes when asked for confirmation before package
                 installation.

ENVIRONMENT
     The following environment variables affect the execution of pkg install.
     See pkg.conf(5) for further description.

ASSUME_ALWAYS_YES

pkg.conf(5)
Code:
OPTIONS

ASSUME_ALWAYS_YES: boolean
                      When this option is enabled pkg(1) will automatically
                      assume "yes" to all questions which require user
                      confirmation before doing anything, as if it the -y flag
                      was specified.  Default: NO.
 
thank you. can't see how i missed that. i will recheck. Oh! tha's a different command. pkg install, pkg-install. ok.
 
Its the same command, you just can't add spaces in manpage names. Thus the '-'.

Before pkgng formally took over we had pkg_add and pkg-add manpages ;)
 
Back
Top