Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pjkix
Forked from reaktivo/new_kohana_app.sh
Created May 22, 2010 19:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pjkix/410315 to your computer and use it in GitHub Desktop.
Save pjkix/410315 to your computer and use it in GitHub Desktop.
kohana3 git modules setup script
#!/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