Skip to content

Instantly share code, notes, and snippets.

@ionas
Created August 31, 2015 13:03
Show Gist options
  • Save ionas/c9d773e0eed86cf653b7 to your computer and use it in GitHub Desktop.
Save ionas/c9d773e0eed86cf653b7 to your computer and use it in GitHub Desktop.
dereuromark DS cakephp-sandbox DS build.sh
#!/bin/bash
# Warning: This is NOT a productive script, but for local dev envs only!
echo "### INSTALL/UPDATE ###";
php composer.phar selfupdate
git pull
php composer.phar install --prefer-dist --no-dev --optimize-autoloader --no-interaction
chmod +x bin/cake
mkdir -p ./webroot/js/cjs/
mkdir -p ./webroot/css/ccss/
echo "### ASSETS ###";
bin/cake AssetCompress.AssetCompress build
echo "### DB MIGRATION ###";
bin/cake Migrations migrate
echo "### CLEANUP ###";
rm -rf ./tmp/cache/models/*
rm -rf ./tmp/cache/persistent/*
chown -R www-data:www-data *
chmod -R 0770 ./tmp
chmod -R 0770 ./logs
chmod -R 0770 ./webroot/js/cjs/
chmod -R 0770 ./webroot/css/ccss/
echo "### DONE ###";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment