From 0fcd576d4f1a3556461a70a2bb9d189d23524c34 Mon Sep 17 00:00:00 2001 From: Luke Morton Date: Tue, 12 Apr 2011 11:21:35 -0700 Subject: [PATCH] --- newapp.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 newapp.sh diff --git a/newapp.sh b/newapp.sh new file mode 100644 index 0000000..0bbcbc5 --- /dev/null +++ b/newapp.sh @@ -0,0 +1,34 @@ +# Grab the Vitals. +# +# You will need installed: +# +# * git +# * apache ( + mod_php ) +# + +if [$APP_PATH == ""] +then + # Use default application path + APP_PATH = /var/www/ +fi + +# Request application name +echo "Please provide a name for your app (used as folder name under /var/www/): " +read APP_NAME + +# Create folder in application path and change into it +mkdir -p $APP_PATH/$APP_NAME/ +cd $APP_PATH/$APP_NAME/ + +# Create application folders with correct perms +mkdir {application,modules} +mkdir application/{classes,templates,public,cache,logs} +chmod 0777 application/cache application/logs + +# Get system files +git submodule add https://github.com/kohana/core.git system + +# Init repo +git init +git add . +git commit -m "My base Kohana setup for $APP_NAME" \ No newline at end of file