Created
February 5, 2009 07:44
-
-
Save hokaccha/58603 to your computer and use it in GitHub Desktop.
sfinit shell script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
pjName=$1 | |
version=$2 | |
if [ ! "$pjName" -o ! "$version" ]; then | |
echo 'usage: sfinit project_name version'; | |
exit; | |
fi | |
if expr "$version" : "^1\.0" >/dev/null; then | |
create=init-project | |
else | |
create=generate:project | |
fi | |
mkdir -p ${pjName}/vendor | |
cd ${pjName}/vendor | |
pear config-create `pwd` .pearrc | |
pear -c .pearrc channel-discover pear.symfony-project.com | |
pear -c .pearrc install -a symfony/symfony-${version} | |
cd .. | |
vendor/pear/symfony ${create} ${pjName} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment