#!/bin/bash

mkdir app/tmp
mkdir app/tmp/logs
mkdir app/tmp
mkdir app/tmp/cache
mkdir app/tmp/cache/models
mkdir app/tmp/cache/persistent
mkdir app/tmp/cache/queries
mkdir app/webroot/uploads
mkdir app/tmp/sessions

mkdir app/tmp/logs
mkdir app/tmp/tests

chmod 777 lib
chmod 777 lib/* -R
chmod 777 app -R
chmod 777 app/Config/ -R
chmod 777 app/tmp/ -R
chmod 777 app/Plugin/FilterResults -R
chmod 777 app/View/Themed/ -R
chmod 777 app/webroot/uploads -R
chmod 777 app/webroot/img -R
chmod 777 app/tmp/cache

rm app/tmp/cache/models/*
rm app/tmp/cache/persistent/*
rm app/tmp/cache/queries/*
