Created
March 21, 2012 19:17
-
-
Save daveWid/2151577 to your computer and use it in GitHub Desktop.
Phing Kohana Application Setup
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="" default="setup" basedir="."> | |
<!-- Application setup --> | |
<target name="setup"> | |
<!-- Initialize git repo --> | |
<exec executable="git" passthru="true" checkreturn="true" escape="false"> | |
<arg value="init" /> | |
</exec> | |
<!-- Make the needed directories for the application --> | |
<mkdir dir="${project.basedir}/public/css" /> | |
<mkdir dir="${project.basedir}/public/images" /> | |
<mkdir dir="${project.basedir}/public/js" /> | |
<mkdir dir="${project.basedir}/classes/controller" /> | |
<mkdir dir="${project.basedir}/classes/model" /> | |
<mkdir dir="${project.basedir}/config" /> | |
<mkdir dir="${project.basedir}/views" /> | |
<mkdir dir="${project.basedir}/cache" mode="0777" /> | |
<mkdir dir="${project.basedir}/logs" mode="0777" /> | |
<!-- Add in the default application files --> | |
<exec executable="curl" passthru="true" checkreturn="true" escape="false"> | |
<arg value="-o" /> | |
<arg value="${project.basedir}/public/index.php" /> | |
<arg value="https://raw.github.com/kohana/kohana/3.2/master/index.php" /> | |
</exec> | |
<exec executable="curl" passthru="true" checkreturn="true" escape="false"> | |
<arg value="-o" /> | |
<arg value="${project.basedir}/public/.htaccess" /> | |
<arg value="https://raw.github.com/kohana/kohana/3.2/master/example.htaccess" /> | |
</exec> | |
<exec executable="curl" passthru="true" checkreturn="true" escape="false"> | |
<arg value="-o" /> | |
<arg value="${project.basedir}/bootstrap.php" /> | |
<arg value="https://raw.github.com/kohana/kohana/3.2/master/application/bootstrap.php" /> | |
</exec> | |
<!-- Setup .gitignore files --> | |
<echo file="${project.basedir}/.gitignore">.DS_Store</echo> | |
<echo file="${project.basedir}/logs/.gitignore">[^.]*</echo> | |
<echo file="${project.basedir}/cache/.gitignore">[^.]*</echo> | |
<!-- Commit and we are done --> | |
<exec executable="git" passthru="true" checkreturn="true" escape="false"> | |
<arg value="add" /> | |
<arg value="." /> | |
</exec> | |
<exec executable="git" passthru="true" checkreturn="true" escape="false"> | |
<arg value="commit" /> | |
<arg value="-m" /> | |
<arg value="'Initial Commit.'" /> | |
</exec> | |
<!-- Send success message --> | |
<echo message="Application ready: Stay Frosty!" /> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment