Created
September 17, 2011 11:58
-
-
Save yuya-takeyama/1223872 to your computer and use it in GitHub Desktop.
個人的な symfony 1.4 インストールスクリプト
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 | |
# | |
# 個人的な symfony 1.4 インストールスクリプト. | |
# | |
# やってること: | |
# 1. symfony 1.4 のインストール. | |
# 2. ./web/sf にシンボリックリンクを設定. | |
# 3. .gitignore の生成. | |
# 4. sfDoctrineMasterSlavePlugin のインストール. | |
# 5. sfPHPUnit2Plugin のインストール. | |
# 6. PHPUnit 用設定ファイルの生成. | |
# 7. generate:app コマンドによる frontend app の生成. | |
# 8. sfJpMobilePlugin のインストール. | |
# 9. frontend app に sfJpMobilePlugin の設定を適用. | |
# | |
# Author: Yuya Takeyama | |
dir=$1 | |
project=$2 | |
author=$3 | |
if test -z "$2" | |
then | |
echo "Usage: sh $0 destination_dir project_name [author]" | |
exit | |
fi | |
echo "Beginning symfony 1.4 installation into " $dir | |
if [ ! -d $dir ]; then | |
mkdir $dir | |
fi | |
cd $dir | |
mkdir -p lib/vendor | |
cd lib/vendor | |
curl "http://www.symfony-project.org/get/symfony-1.4.14.tgz" > symfony.tgz | |
tar xvzf symfony.tgz | |
rm -v symfony.tgz | |
cd ../.. | |
php lib/vendor/symfony-1.4.14/data/bin/symfony generate:project "${project}" "${author}" | |
cd web | |
ln -s ../lib/vendor/symfony-1.4.14/data/web/sf | |
cd .. | |
echo '*.swp | |
cache/* | |
log/* | |
web/uploads/*' > .gitignore | |
php symfony plugin:install sfDoctrineMasterSlavePlugin | |
sed -i -e 's/sfDoctrinePlugin/DoctrinePlugin001/' \ | |
-e 's/sfDoctrineMasterSlavePlugin/DoctrinePlugin002/' \ | |
-e 's/DoctrinePlugin001/sfDoctrineMasterSlavePlugin/' \ | |
-e 's/DoctrinePlugin002/sfDoctrinePlugin/' \ | |
./config/ProjectConfiguration.class.php | |
php symfony plugin:install --stability=beta sfPHPUnit2Plugin | |
php symfony phpunit:generate-configuration | |
php symfony generate:app frontend | |
php symfony plugin:add-channel openpear.org | |
php symfony plugin:install http://openpear.org/get/sfJpMobilePlugin-0.0.6.tgz | |
echo "all:\n view:\n class: sfJpMobile" > ./apps/frontend/config/app.yml | |
sed -i -e 's/^all:/all:\n controller:\n class: sfJpMobileController\n/' \ | |
./apps/frontend/config/factories.yml | |
echo "\n storage:\n class: sfJpMobileSessionStorage\n param:\n session_name: s" \ | |
>> ./apps/frontend/config/factories.yml | |
sed -i -e 's/filters here/filters here\njpmobile:\n class: sfJpMobileFilter/' \ | |
./apps/frontend/config/filters.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment