forked from mizhiming521/typecho
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
96 lines (72 loc) · 2.01 KB
/
Makefile
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#define root directory
DIR=../
#update subversion
update:
@echo 'git update'
rm -Rf build/
git clone --depth=1 https://github.com/typecho/typecho.git build
rm -Rf build/.git
rm -Rf build/.github
rm -f build/.gitignore
rm -f build/.gitattributes
for i in `find build/ -name '*.css'`; do echo $$i && java -Xmx32m -jar yuicompressor-2.4.2.jar $$i --charset UTF-8 -o $$i; done;
for i in `find build/admin/js/ -name '*.js'`; do echo $$i && java -Xmx32m -jar yuicompressor-2.4.2.jar $$i --charset UTF-8 -o $$i; done;
for i in `find build/ -name '*.php'`; do php -l $$i; done;
rm:
rm -Rf build/tools/
rm -Rf build/.git*
rm -f build/changelog.txt
rm -f build/.editorconfig
rm -f build/.travis.yml
rm -f build/README.md
rm -Rf build/admin/scss
rm -Rf build/admin/img/editor
rm -Rf build/admin/img/icons
rm -Rf build/admin/img/icons-2x
package:
@echo 'package'
make rm
mkdir build/usr/uploads/
chmod 777 build/usr/uploads/
tar -cvvzf build.tar.gz build/
clear:
rm -Rf build/
upgrade:
make update
rm -Rf ${DIR}/admin/
cp -Rf build/admin/ ${DIR}
rm -Rf ${DIR}/var/
cp -Rf build/var/ ${DIR}
rm -Rf ${DIR}/index.php
cp build/index.php ${DIR}
cp build/install.php ${DIR}
make clear
langs:
rm -rf ../usr/langs
mkdir ../usr/langs
git clone https://github.com/typecho/languages.git
cd languages/ && for i in `find . -name '*.po'`; do echo `basename $$i` && msgfmt -o `basename $$i .po`.mo `basename $$i`; done;
cp languages/*.mo ../usr/langs/
rm -rf languages
theme:
make update
rm -Rf ${DIR}/usr/themes/default/
cp -Rf build/usr/themes/default/ ${DIR}/usr/themes/
make clear
install:
make update
make rm
mkdir build/usr/uploads/
chmod 777 build/usr/uploads/
cp -Rf build/* ${DIR}
make clear
pot:
php build_pot.php > messages.pot
test:
for i in `find ../var/ -name '*.php'`; do php -l $$i || exit 1; done;
for i in `find ../usr/ -name '*.php'`; do php -l $$i || exit 1; done;
for i in `find ../admin/ -name '*.php'`; do php -l $$i || exit 1; done;
all:
make update
make package
make clear