Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use variables for the vvv-hosts and .conf files #1

Open
ghost opened this issue Jan 8, 2014 · 1 comment
Open

how to use variables for the vvv-hosts and .conf files #1

ghost opened this issue Jan 8, 2014 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 8, 2014

I'm trying to set up an interactive version of this repo, so the hostname and database name can be provided from user input or bash variables, rather than being ardcoded into these files.

The vvv-init.sh is the only shell script, and the other to files are parsed somehow later.

Say I have a config.sh with this:

export NEWSITENAME = "mysite";
export NEWDBNAME = "mydb" ;

For vvv-hosts I'm creating that directly from the vvv-init.sh like this:

# import the config to keep it DRY
. config.sh;  // (to-do: alternatively ask for user input...)

echo "Commencing setup of $NEWSITENAME"

touch "vvv-hosts"
echo "${NEWSITENAME}.de >" | vvv-hosts

but now I still need to handle vvv-nginx.conf, and I'd like not to autogenerate these files, so how can I pass $NEWSITENAME and $NEWDBNAME into this file so it will be parsed right?

@hew
Copy link

hew commented Nov 22, 2014

You may want to check out the Yeoman generator for VVV, or the vvv-site-wizard. They both accomplish more-or-less the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant