Skip to content

Instantly share code, notes, and snippets.

@dominikzogg
Last active October 1, 2015 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dominikzogg/aaedcd3536657e4ddfa2 to your computer and use it in GitHub Desktop.
Save dominikzogg/aaedcd3536657e4ddfa2 to your computer and use it in GitHub Desktop.
create-symfony-project.sh
#!/bin/bash
if [ -z "$1" ]; then
echo "please enter a projectname: myproject"
exit 1
fi
if [ -z "$2" ]; then
echo "please enter a symfony version: 2.7.5"
exit 1
fi
wget https://github.com/symfony/symfony-standard/archive/v$2.zip
if [ ! -f v$2.zip ]; then
echo "Download failed, there is no zip with name v$2.zip"
exit 1
fi
unzip v$2.zip
rm v$2.zip
mv symfony-standard-$2 $1
cd $1
git init
git submodule add -b v1-ubuntu https://github.com/dominikzogg/vagrant-php.git
printf "hostname: $1.dev\napplication: symfony\n" > vagrant.yml
printf "\n\n.idea\n/app/runtime_dir_config.php\n" >> .gitignore
cd vagrant-php
vagrant up
vagrant ssh -c "cd /vagrant && composer.phar install"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment