-
-
Save pjkix/410315 to your computer and use it in GitHub Desktop.
kohana3 git modules setup 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 | |
# create local repo | |
git init | |
# import kohana + offical mods | |
#git submodule add git://github.com/kohana/kohana.git lib/kohana | |
# import kohana core as git submodule | |
git submodule add git://github.com/kohana/core.git system | |
# import more kohana modules as git submodules | |
git submodule add git://github.com/kohana/database.git modules/database | |
git submodule add http://github.com/kohana/userguide.git modules/userguide | |
git submodule add http://github.com/kohana/image.git modules/image | |
git submodule add http://github.com/kohana/codebench.git modules/codebench | |
git submodule add http://github.com/kohana/auth.git modules/auth | |
git submodule add http://github.com/kohana/pagination.git modules/pagination | |
git submodule add http://github.com/kohana/orm.git modules/orm | |
git submodule add http://github.com/shadowhand/sprig.git modules/sprig | |
# more submodules | |
git submodule add git://github.com/kohana/unittest.git modules/unittest | |
git submodule add git://github.com/kohana/cache.git modules/cache | |
# init submodules & commit | |
git submodule init | |
git commit -m 'Added initial submodules' | |
# make our app structure | |
mkdir -p app/classes/{controller,model} | |
mkdir -p app/{config,views} | |
mkdir -p public/{static,content} | |
mkdir -m 0777 -p app/{cache,logs} | |
# ignore logs & cahe | |
echo '[^.]*' > app/logs/.gitignore | |
echo '[^.]*' > app/cache/.gitignore | |
# grab the latest index & bootstrap? | |
curl -o public/index.php http://github.com/kohana/kohana/raw/master/index.php | |
curl -o public/.htaccess http://github.com/kohana/kohana/raw/master/example.htaccess | |
curl -o app/bootstrap.php http://github.com/kohana/kohana/raw/master/application/bootstrap.php | |
curl -o app/classes/controller/welcome.php http://github.com/kohana/kohana/raw/master/application/classes/controller/welcome.php | |
# add our app to git | |
git add app public | |
git commit -m 'Added initial directory structure' | |
# done | |
echo 'Done: now just edit public/index.php & app/bootstrap.php & .htaccess ...' | |
# success | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment