forked from dereuromark/cakephp-sandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup
47 lines (31 loc) · 1.11 KB
/
setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# Warning: This is NOT a productive script, but for local dev envs only!
set -o pipefail
echo "### INSTALL/UPDATE ###";
[ ! -f composer.phar ] && curl -sS https://getcomposer.org/installer | php
php composer.phar selfupdate
[ ! -f phpunit.phar ] && wget https://phar.phpunit.de/phpunit.phar
git pull
php composer.phar install
[ ! -f config/app_local.php ] && cp config/app_local.default.php config/app_local.php && echo "ERROR: DB credentials missing, enter them now and run again!" && exit 1
mkdir -p ./tmp
mkdir -p ./logs
mkdir -p ./webroot/js/cjs/
mkdir -p ./webroot/css/ccss/
chmod +x bin/cake
php composer.phar migrate
echo "### ASSETS ###";
#npm install -g bower
#npm install -g ttembed-js
bower install
ttembed-js ./webroot/assets/font-awesome/fonts/fontawesome-webfont.ttf
mkdir -p ./webroot/css/fonts
cp -R ./webroot/assets/bootstrap/dist/fonts/* ./webroot/css/fonts/
cp -R ./webroot/assets/font-awesome/fonts/* ./webroot/css/fonts/
echo "### CLEANUP ###";
rm -rf ./tmp/cache/models/*
rm -rf ./tmp/cache/persistent/*
echo "### IDE HELPER ###";
php composer.phar setup
echo "### DONE ###";
exit 0