-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
99 lines (73 loc) · 3.29 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
97
98
99
UPLOAD=./upload $(1) $(2)
# when you change branch in main repo the timestamp of the file get update and the file get uploaded
# so we check md5 sum to not upload the file if it didn't change but only for files from main repo
CHECK_UPLOAD=md5sum -c $(1) > /dev/null 2>&1 || (./upload $(2) $(3); md5sum $(2) > $(1))
SIZE=ls -sh $(1) | cut -d' ' -f1
GZIP_SIZE=cp $(1) tmp && gzip tmp && ls -sh tmp.gz | cut -d' ' -f1 && rm tmp.gz
ALL: js/jquery.terminal.min.js css/jquery.terminal.min.css 400.php 401.php 403.php 404.php 500.php
404.php: error.php
sed -e 's/{{TITLE}}/Page Not Found/g' -e 's/{{CODE}}/404/' error.php > 404.php
500.php: error.php
sed -e 's/{{TITLE}}/Internal Server Error/g' -e 's/{{CODE}}/500/' error.php > 500.php
400.php: error.php
sed -e 's/{{TITLE}}/Bad Request/g' -e 's/{{CODE}}/400/' error.php > 400.php
401.php: error.php
sed -e 's/{{TITLE}}/Unauthorized/g' -e 's/{{CODE}}/401/' error.php > 401.php
403.php: error.php
sed -e 's/{{TITLE}}/Forbidden/g' -e 's/{{CODE}}/403/' error.php > 403.php
upload: .upload/service.php .upload/api_reference.php .upload/documentation.php .upload/examples.php .upload/jquery.terminal-src.js .upload/jquery.terminal-src.css .upload/style.css .upload/index.php .upload/404.php .upload/403.php .upload/500.php .upload/terminal.error.js .upload/chat.js .upload/sysend.js .upload/favico.min.js .upload/matrix.js .upload/snake.js .upload/tetris.js .upload/rouge.js
.upload/service.php: service.php
@$(call UPLOAD, service.php,/)
@touch .upload/service.php
.upload/index.php: index.php
@$(call UPLOAD, index.php,/)
@touch .upload/index.php
.upload/jquery.terminal-src.js: ../js/jquery.terminal-src.js
@$(call CHECK_UPLOAD, .upload/jquery.terminal-src.js, ../js/jquery.terminal-src.js,/js/)
.upload/jquery.terminal-src.css: ../css/jquery.terminal-src.css
@$(call CHECK_UPLOAD, .upload/jquery.terminal-src.css,../css/jquery.terminal-src.css,/css/)
.upload/style.css: css/style.css
@$(call UPLOAD,css/style.css,/css/)
@touch .upload/style.css
.upload/api_reference.php: api_reference.php
@$(call UPLOAD, api_reference.php,/)
@touch .upload/api_reference.php
.upload/examples.php: examples.php
@$(call UPLOAD, examples.php,/)
@touch .upload/examples.php
.upload/documentation.php: documentation.php
@$(call UPLOAD, documentation.php,/)
@touch .upload/documentation.php
.upload/terminal.error.js: js/terminal.error.js
@$(call UPLOAD, js/terminal.error.js,/js/)
@touch .upload/terminal.error.js
.upload/404.php: 404.php
@$(call UPLOAD, 404.php,/)
@touch .upload/404.php
.upload/403.php: 403.php
@$(call UPLOAD, 403.php,/)
@touch .upload/403.php
.upload/500.php: 500.php
@$(call UPLOAD, 500.php,/)
@touch .upload/500.php
.upload/chat.js: js/chat.js
@$(call UPLOAD, js/chat.js,/js/)
@touch .upload/chat.js
.upload/sysend.js: js/sysend.js
@$(call UPLOAD, js/sysend.js,/js/)
@touch .upload/sysend.js
.upload/favico.min.js: js/favico.min.js
@$(call UPLOAD, js/favico.min.js,/js/)
@touch .upload/favico.min.js
.upload/matrix.js: js/matrix.js
@$(call UPLOAD, js/matrix.js,/js/)
@touch .upload/matrix.js
.upload/snake.js: js/snake.js
@$(call UPLOAD, js/snake.js,/js/)
@touch .upload/snake.js
.upload/tetris.js: js/tetris.js
@$(call UPLOAD, js/tetris.js,/js/)
@touch .upload/tetris.js
.upload/rouge.js: js/rouge.js
@$(call UPLOAD, js/rouge.js,/js/)
@touch .upload/rouge.js