Skip to content

Instantly share code, notes, and snippets.

@reaktivo
Created May 3, 2010 22:50
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save reaktivo/388687 to your computer and use it in GitHub Desktop.
Save reaktivo/388687 to your computer and use it in GitHub Desktop.
git init
git submodule add git://github.com/kohana/core.git system
git submodule add git://github.com/kohana/database.git modules/database
git submodule add git://github.com/kohana/userguide.git modules/userguide
git submodule add git://github.com/kohana/image.git modules/image
git submodule add git://github.com/kohana/codebench.git modules/codebench
git submodule add git://github.com/kohana/auth.git modules/auth
git submodule add git://github.com/kohana/pagination.git modules/pagination
git submodule add git://github.com/kohana/orm.git modules/orm
git submodule add git://github.com/shadowhand/sprig.git modules/sprig
git submodule init
git commit -m 'Added initial submodules'
mkdir -p application/classes/{controller,model}
mkdir -p application/{config,views}
mkdir -m 0777 -p application/{cache,logs}
echo '[^.]*' > application/{logs,cache}/.gitignore
curl -o index.php https://raw.github.com/kohana/kohana/3.1/master/index.php
curl -o application/bootstrap.php https://raw.github.com/kohana/kohana/3.1/master/application/bootstrap.php
git add index.php
git add application
git commit -m 'Added initial directory structure'
@pjkix
Copy link

pjkix commented May 22, 2010

nice! i noticed this error message though ...
./new_kohana_app.sh: line 21: application/{logs,cache}/.gitignore: ambiguous redirect

@reaktivo
Copy link
Author

what shell are you on?
I suppose you could change that line to:

echo '[^.]' > application/logs/.gitignore
echo '[^.]
' > application/cache/.gitignore

@brettalton
Copy link

If you're using anything below bash 3 then "mkdir -p application/classes/{controller,model}" and the like won't work. I found this out the hard way when trying to use {a..z} on a crappy web host before.

@DeaconDesperado
Copy link

The curl commands for github now redirect and need to be changed to the raw.github.com subdomain.
ex:
curl -o index.php https://raw.github.com/kohana/kohana/3.0/master/index.php
curl -o application/bootstrap.php https://raw.github.com/kohana/kohana/3.0/master/application/bootstrap.php

This same error is reflected in the documentation for "Working with Git" on the Kohana site.
http://kohanaframework.org/3.0/guide/kohana/tutorials/git

@reaktivo
Copy link
Author

reaktivo commented Sep 6, 2011

Thanks, updated to use kohana 3.1 too.
You can use
curl https://raw.github.com/gist/388687/0c39f5f85f7fe7c104db924 bf6f25d46732e6115/new_kohana_app.sh | sh

to install, treat carefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment