bradp / vv

:globe_with_meridians: Variable VVV - a VVV Site Creation Wizard.‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ :x: This project is no longer maintained. Please update your copy of VVV , which has most of the vv features built in.
GNU General Public License v2.0
1k stars 89 forks source link

Way to pass "N" or "No" to some of the create arguments #312

Open tmuka opened 8 years ago

tmuka commented 8 years ago

I know i can pass some of these command line flags for vv create, but is it possible to pass N or No to them so i'm not prompted interactively?

Install as multisite? (y/N):
 Local SQL file to import for database (leave blank to skip):
 Add sample content to site (y/N):
 Enable WP_DEBUG and WP_DEBUG_LOG (y/N):
scarstens commented 7 years ago

I arrived here also looking for an answer, trying to create a non-interactive install script

scarstens commented 7 years ago

found 2 solutions, first it looks like if you pass --default its supposed to automatically choose default values or bypass the interactive nature of the script. That said, I couldn't ever get it to work, it just stalled when I used it. the second option was to pipe in the default answers. I haven't tested this to completion, but it definitely "appears" to work from the CLI responses I get.

# BUILD VVV SITE USING VV NON-INTERACTIVE
echo "Autmated VV Script V9"
echo "y" | vv \
 --defaults \
 --debug-vv create \
 -d automatedvv.dev -n automatedvv.dev \
 -f -i -x -m subdomain \
 -rd \
 -db false \
 -wv "latest" \
 -gr false \
 -sc \
 -u "fansided.com"
echo "END Autmated VV Script V9"