-
Notifications
You must be signed in to change notification settings - Fork 50
/
Makefile
391 lines (344 loc) · 14.5 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
include ../common.mak
all:
clean:
install:
# Create initial folders
rm -rf $(INSTALLDIR)/www
mkdir -p $(INSTALLDIR)/www
mkdir -p $(INSTALLDIR)/www/js
mkdir -p $(INSTALLDIR)/www/css
mkdir -p $(INSTALLDIR)/www/css/schemes
# Copy files we don't want to modify to new install directory
cp *.ico *.html *.php robots.txt tux.png $(INSTALLDIR)/www
# Copy JS files to the installdir and squish files by trimming whitespace
for F in $(wildcard js/*.js js/*.jsx *.js *.jsx); do \
sed '/^\/\*\s*$$/,/\*\//! { s/^\s\+//; s/\s\+$$//; /^\/\/ --\+\s*/d; /^$$/d }' < $$F > $(INSTALLDIR)/www/$$F; \
done
# Copy CSS files to the installdir and squish files by trimming whitespace
for F in $(wildcard css/schemes/*.css css/*.css *.css); do \
sed '/^\/\*\s*$$/,/\*\//! { s/\s\+/ /g; s/^\s\+//; s/\s\+$$//; /^$$/d }' < $$F > $(INSTALLDIR)/www/$$F; \
done
# Copy asp files to the installdir
# remove "debug.js" references, convert color.css, remove comments
# in between REMOVE-BEGIN and REMOVE-END, and compress whitespace
# (and copy them to the INSTALLDIR)
#
# The expressions to delete comments from asp files are placed further down the Makefile, to affect not only these
# asp files
# -e "s,<!-- / / / -->,," \
# -e "/^<!--$$/,/^-->$$/! { s,^\s\+, , }"
#
for F in $(wildcard *.asp *.svg); do \
sed -e "/REMOVE-BEGIN/,/REMOVE-END/d" \
-e "s,<script[^>]\+debug\.js[^>]\+></script>,," \
-e "s,<link[^>]\+href='color\.css'>,<% css(); %>," \
-e "s,color\.css,<% nv('web_css'); %>\.css," \
-e "s,\x0d,," \
-e "s,^\s\+,," \
-e "/^$$/d" \
$$F > $(INSTALLDIR)/www/$$F; \
done
#-------------------------------- COMPILER DIRECTIVES -----------------------------------------------
# Only include Linux 2.6 options if building for Linux 2.6.
ifneq ($(CONFIG_LINUX26),y)
cd $(INSTALLDIR)/www && \
for F in $(wildcard *.asp *.js js/*.js js/*.jsx); do \
sed -i $$F -e "/LINUX26-BEGIN/,/LINUX26-END/d"; \
done
# But remove some K24 options if building for Linux 2.6.
else
cd $(INSTALLDIR)/www && \
for F in $(wildcard *.asp *.js js/*.js js/*.jsx); do \
sed -i $$F -e "/LINUX24-BEGIN/,/LINUX24-END/d"; \
done
endif
#only include MultiWAN options if MULTIWAN is configured in.
ifneq ($(TCONFIG_MULTIWAN),y)
cd $(INSTALLDIR)/www && \
for F in $(wildcard *.asp *.js *.jsx js/*.js js/*.jsx); do \
sed -i $$F -e "/MULTIWAN-BEGIN/,/MULTIWAN-END/d"; \
done
# or remove dualwan options
else
cd $(INSTALLDIR)/www && \
for F in $(wildcard *.asp *.js *.jsx js/*.js js/*.jsx); do \
sed -i $$F -e "/DUALWAN-BEGIN/,/DUALWAN-END/d"; \
done
endif
ifeq ($(TCONFIG_MIPSR2),y)
sed -i $(INSTALLDIR)/www/tomato.js -e "/MIPSR1-BEGIN/,/MIPSR1-END/d"
rm -f $(INSTALLDIR)/www/advanced-vlan-r1.asp
else
sed -i $(INSTALLDIR)/www/tomato.js -e "/MIPSR2-BEGIN/,/MIPSR2-END/d"
rm -f $(INSTALLDIR)/www/advanced-vlan.asp
endif
# Only include the CIFS pages if CIFS is configured in.
ifneq ($(TCONFIG_CIFS),y)
rm -f $(INSTALLDIR)/www/admin-cifs.asp
sed -i $(INSTALLDIR)/www/tomato.js -e "/CIFS-BEGIN/,/CIFS-END/d"
sed -i $(INSTALLDIR)/www/admin-bwm.asp -e "/CIFS-BEGIN/,/CIFS-END/d"
sed -i $(INSTALLDIR)/www/nas-media.asp -e "/CIFS-BEGIN/,/CIFS-END/d"
endif
# Only include the JFFS pages if JFFS is configured in.
ifneq ($(TCONFIG_JFFS2),y)
rm -f $(INSTALLDIR)/www/admin-jffs2.asp
sed -i $(INSTALLDIR)/www/tomato.js -e "/JFFS2-BEGIN/,/JFFS2-END/d"
sed -i $(INSTALLDIR)/www/admin-bwm.asp -e "/JFFS2-BEGIN/,/JFFS2-END/d"
sed -i $(INSTALLDIR)/www/admin-upgrade.asp -e "/JFFS2-BEGIN/,/JFFS2-END/d"
sed -i $(INSTALLDIR)/www/nas-media.asp -e "/JFFS2-BEGIN/,/JFFS2-END/d"
endif
# Only include the Zebra options if Zebra is configured in.
ifneq ($(TCONFIG_ZEBRA),y)
sed -i $(INSTALLDIR)/www/advanced-routing.asp -e "/ZEBRA-BEGIN/,/ZEBRA-END/d"
endif
# Only include EMF options if EMF is configured in.
ifneq ($(TCONFIG_EMF),y)
sed -i $(INSTALLDIR)/www/advanced-routing.asp -e "/EMF-BEGIN/,/EMF-END/d"
endif
# Only include sd/mmc card support if MICROSD is configured in.
ifneq ($(TCONFIG_MICROSD),y)
sed -i $(INSTALLDIR)/www/nas-usb.asp -e "/MICROSD-BEGIN/,/MICROSD-END/d"
endif
# Only include NTFS settings if NTFS support is configured in.
ifneq ($(TCONFIG_NTFS),y)
sed -i $(INSTALLDIR)/www/nas-usb.asp -e "/NTFS-BEGIN/,/NTFS-END/d"
endif
# Only include the FTP pages if FTP Server is configured in.
ifneq ($(TCONFIG_FTP),y)
rm -f $(INSTALLDIR)/www/nas-ftp.asp
sed -i $(INSTALLDIR)/www/tomato.js -e "/FTP-BEGIN/,/FTP-END/d"
endif
# Only include the Samba pages if Samba is configured in.
ifneq ($(TCONFIG_SAMBASRV),y)
rm -f $(INSTALLDIR)/www/nas-samba.asp
sed -i $(INSTALLDIR)/www/tomato.js -e "/SAMBA-BEGIN/,/SAMBA-END/d"
endif
# Only include the Media Server pages if Media Server is configured in.
ifneq ($(TCONFIG_MEDIA_SERVER),y)
rm -f $(INSTALLDIR)/www/nas-media.asp
sed -i $(INSTALLDIR)/www/tomato.js -e "/MEDIA-SRV-BEGIN/,/MEDIA-SRV-END/d"
endif
# Victek for RAF verion
# Only include Captive Portal menu option and pages when configured.
ifneq ($(TCONFIG_NOCAT),y)
rm -f $(INSTALLDIR)/www/advanced-splashd.asp
rm -f $(INSTALLDIR)/www/splash.html
rm -f $(INSTALLDIR)/www/style.css
sed -i $(INSTALLDIR)/www/tomato.js -e "/NOCAT-BEGIN/,/NOCAT-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/NOCAT-BEGIN/,/NOCAT-END/d"
endif
# Clean up NGinX files if not needed
ifneq ($(TCONFIG_NGINX),y)
rm -f $(INSTALLDIR)/www/web-nginx.asp
rm -f $(INSTALLDIR)/www/web-mysql.asp
rm -f $(INSTALLDIR)/www/index.html
rm -f $(INSTALLDIR)/www/phpinfo.php
rm -f $(INSTALLDIR)/www/adminer.php
sed -i $(INSTALLDIR)/www/tomato.js -e "/NGINX-BEGIN/,/NGINX-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/NGINX-BEGIN/,/NGINX-END/d"
endif
# Only include HFS/HFS+ option and pages when configured.
ifneq ($(TCONFIG_HFS),y)
sed -i $(INSTALLDIR)/www/nas-usb.asp -e "/HFS-BEGIN/,/HFS-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/HFS-BEGIN/,/HFS-END/d"
endif
# Only include IPv6 options if IPv6 is configured in.
ifneq ($(TCONFIG_IPV6),y)
cd $(INSTALLDIR)/www && \
for F in $(wildcard js/*.js js/*.jsx *.asp *.js *.jsx); do \
[ -f $(INSTALLDIR)/www/$$F ] && sed -i $$F \
-e "/IPV6-BEGIN/,/IPV6-END/d" \
|| true; \
done
rm -f $(INSTALLDIR)/www/basic-ipv6.asp
endif
# Only include the Transmission binary path select if Transmission binaries is configured in.
ifneq ($(TCONFIG_BBT),y)
sed -i $(INSTALLDIR)/www/nas-bittorrent.asp -e "/BBT-BEGIN/,/BBT-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/BBT-BEGIN/,/BBT-END/d"
endif
# Only include the Transmission pages if Transmission is configured in.
ifneq ($(TCONFIG_BT),y)
rm -f $(INSTALLDIR)/www/nas-bittorrent.asp
sed -i $(INSTALLDIR)/www/tomato.js -e "/BT-BEGIN/,/BT-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/BT-BEGIN/,/BT-END/d"
endif
# Only include the UPS pages if apcupsd is configured in.
ifneq ($(TCONFIG_UPS),y)
rm -f $(INSTALLDIR)/www/nas-ups.asp
sed -i $(INSTALLDIR)/www/tomato.js -e "/UPS-BEGIN/,/UPS-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/UPS-BEGIN/,/UPS-END/d"
sed -i $(INSTALLDIR)/www/nas-usb.asp -e "/UPS-BEGIN/,/UPS-END/d"
endif
# Only include the TOR pages if tor project is configured in.
ifneq ($(TCONFIG_TOR),y)
rm -f $(INSTALLDIR)/www/advanced-tor.asp
sed -i $(INSTALLDIR)/www/tomato.js -e "/TOR-BEGIN/,/TOR-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/TOR-BEGIN/,/TOR-END/d"
endif
# Only include the USB and NAS pages if USB Support is configured in.
ifneq ($(TCONFIG_USB),y)
rm -f $(INSTALLDIR)/www/nas-*.*
sed -i $(INSTALLDIR)/www/tomato.js -e "/USB-BEGIN/,/USB-END/d"
sed -i $(INSTALLDIR)/www/admin-buttons.asp -e "/USB-BEGIN/,/USB-END/d"
sed -i $(INSTALLDIR)/www/admin-access.asp -e "/USB-BEGIN/,/USB-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/USB-BEGIN/,/USB-END/d"
endif
# Only include the USB and NAS pages if REMOVE_USBAPP is NOT configured in.
ifeq ($(TCONFIG_REMOVE_USBAPP),y)
rm -f $(INSTALLDIR)/www/nas-*.*
sed -i $(INSTALLDIR)/www/tomato.js -e "/USB-BEGIN/,/USB-END/d"
sed -i $(INSTALLDIR)/www/admin-buttons.asp -e "/USB-BEGIN/,/USB-END/d"
sed -i $(INSTALLDIR)/www/admin-access.asp -e "/USB-BEGIN/,/USB-END/d"
endif
## Only include CTF option if CTF module exists
# test -d $(SRCBASE)/ctf/linux || sed -i $(INSTALLDIR)/www/advanced-misc.asp -e "/CTF-BEGIN/,/CTF-END/d"
# Only include the CTF configuration if CTF is configured in.
ifneq ($(TCONFIG_CTF),y)
sed -i $(INSTALLDIR)/www/advanced-misc.asp -e "/CTF-BEGIN/,/CTF-END/d"
endif
# Only include the vpn pages if OpenVPN is compiled in
# Remove AES ciphers from the GUI if openssl doesn't have an AES directory
ifeq ($(TCONFIG_OPENVPN),y)
test -d ../openssl/crypto/aes || sed -i $(INSTALLDIR)/www/vpn.js -e "/AES-BEGIN/,/AES-END/d"
sed -i $(INSTALLDIR)/www/tomato.js -e "/ VPN-BEGIN/d" -e "/ VPN-END/d"
sed -i $(INSTALLDIR)/www/admin-access.asp -e "/ VPN-BEGIN/d" -e "/ VPN-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/ VPN-BEGIN/d" -e "/ VPN-END/d"
else
rm -f $(INSTALLDIR)/www/vpn-server.asp
rm -f $(INSTALLDIR)/www/vpn-client.asp
rm -f $(INSTALLDIR)/www/js/vpn.js
sed -i $(INSTALLDIR)/www/tomato.js -e "/ OPENVPN-BEGIN/,/ OPENVPN-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/ OPENVPN-BEGIN/,/ OPENVPN-END/d"
endif
# Only include the PPTPD pages if PPTPD is compiled in
ifeq ($(TCONFIG_PPTPD),y)
sed -i $(INSTALLDIR)/www/tomato.js -e "/ VPN-BEGIN/d" -e "/ VPN-END/d"
sed -i $(INSTALLDIR)/www/admin-access.asp -e "/ VPN-BEGIN/d" -e "/ VPN-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/ VPN-BEGIN/d" -e "/ VPN-END/d"
else
rm -f $(INSTALLDIR)/www/vpn-pptp-server.asp
rm -f $(INSTALLDIR)/www/vpn-pptp-online.asp
rm -f $(INSTALLDIR)/www/vpn-pptp.asp
sed -i $(INSTALLDIR)/www/tomato.js -e "/ PPTPD-BEGIN/,/ PPTPD-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/ PPTPD-BEGIN/,/ PPTPD-END/d"
endif
# Only include the nfs pages if NFS is compiled in
ifneq ($(TCONFIG_NFS),y)
rm -f $(INSTALLDIR)/www/admin-nfs.asp
sed -i $(INSTALLDIR)/www/tomato.js -e "/NFS-BEGIN/,/NFS-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/NFS-BEGIN/,/NFS-END/d"
endif
# Only include the snmp pages if SNMP is compiled in
ifneq ($(TCONFIG_SNMP),y)
rm -f $(INSTALLDIR)/www/admin-snmp.asp
sed -i $(INSTALLDIR)/www/tomato.js -e "/SNMP-BEGIN/,/SNMP-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/SNMP-BEGIN/,/SNMP-END/d"
endif
# Only include the mmc pages if SDHC is compiled in
ifneq ($(TCONFIG_SDHC),y)
rm -f $(INSTALLDIR)/www/admin-sdhc.asp
sed -i $(INSTALLDIR)/www/tomato.js -e "/SDHC-BEGIN/,/SDHC-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/SDHC-BEGIN/,/SDHC-END/d"
endif
# Only include the dnssec option if is compiled in
ifneq ($(TCONFIG_DNSSEC),y)
sed -i $(INSTALLDIR)/www/basic-network.asp -e "/DNSSEC-BEGIN/,/DNSSEC-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/DNSSEC-BEGIN/,/DNSSEC-END/d"
endif
# Only include the Tinc page if it is compiled in
ifneq ($(TCONFIG_TINC),y)
rm -f $(INSTALLDIR)/www/vpn-tinc.asp
sed -i $(INSTALLDIR)/www/tomato.js -e "/TINC-BEGIN/,/TINC-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/TINC-BEGIN/,/TINC-END/d"
endif
# Only include the dnscrypt option if is compiled in
ifeq ($(TCONFIG_DNSCRYPT),y)
$(TOP)/www/dnscrypt-helper.sh $(INSTALLDIR)/../rom/rom/etc/dnscrypt-resolvers.csv $(INSTALLDIR)/www/basic-network.asp
else
sed -i $(INSTALLDIR)/www/basic-network.asp -e "/DNSCRYPT-BEGIN/,/DNSCRYPT-END/d"
sed -i $(INSTALLDIR)/www/about.asp -e "/DNSCRYPT-BEGIN/,/DNSCRYPT-END/d"
endif
#-------------------------------- END COMPILER DIRECTIVES -----------------------------------------------
# Images
mkdir -p $(INSTALLDIR)/www/img
cp -r img/* $(INSTALLDIR)/www/img/.
# Fonts
mkdir -p $(INSTALLDIR)/www/css/fonts
cp -r css/fonts/* $(INSTALLDIR)/www/css/fonts/.
# clean up compiler directives
cd $(INSTALLDIR)/www && \
for F in $(wildcard *.asp *.js *.jsx js/*.js js/*.jsx *.html); do \
[ -f $(INSTALLDIR)/www/$$F ] && sed -i $$F \
-e "/LINUX26-BEGIN/d" -e "/LINUX26-END/d" \
-e "/LINUX24-BEGIN/d" -e "/LINUX24-END/d" \
-e "/MIPSR2-BEGIN/d" -e "/MIPSR2-END/d" \
-e "/MIPSR1-BEGIN/d" -e "/MIPSR1-END/d" \
-e "/USB-BEGIN/d" -e "/USB-END/d" \
-e "/UPS-BEGIN/d" -e "/UPS-END/d" \
-e "/EXTRAS-BEGIN/d" -e "/EXTRAS-END/d" \
-e "/NTFS-BEGIN/d" -e "/NTFS-END/d" \
-e "/SAMBA-BEGIN/d" -e "/SAMBA-END/d" \
-e "/FTP-BEGIN/d" -e "/FTP-END/d" \
-e "/MEDIA-SRV-BEGIN/d" -e "/MEDIA-SRV-END/d" \
-e "/JFFS2-BEGIN/d" -e "/JFFS2-END/d" \
-e "/CIFS-BEGIN/d" -e "/CIFS-END/d" \
-e "/ZEBRA-BEGIN/d" -e "/ZEBRA-END/d" \
-e "/EMF-BEGIN/d" -e "/EMF-END/d" \
-e "/OPENVPN-BEGIN/d" -e "/OPENVPN-END/d" \
-e "/AES-BEGIN/d" -e "/AES-END/d" \
-e "/PPTPD-BEGIN/d" -e "/PPTPD-END/d"\
-e "/VPN-BEGIN/,/VPN-END/d" \
-e "/IPV6-BEGIN/d" -e "/IPV6-END/d" \
-e "/CTF-BEGIN/d" -e "/CTF-END/d" \
-e "/BBT-BEGIN/d" -e "/BBT-END/d" \
-e "/BT-BEGIN/d" -e "/BT-END/d" \
-e "/NFS-BEGIN/d" -e "/NFS-END/d" \
-e "/NOCAT-BEGIN/d" -e "/NOCAT-END/d"\
-e "/NGINX-BEGIN/d" -e "/NGINX-END/d"\
-e "/SNMP-BEGIN/d" -e "/SNMP-END/d"\
-e "/SDHC-BEGIN/d" -e "/SDHC-END/d"\
-e "/HFS-BEGIN/d" -e "/HFS-END/d"\
-e "/DNSCRYPT-BEGIN/d" -e "/DNSCRYPT-END/d"\
-e "/DNSSEC-BEGIN/d" -e "/DNSSEC-END/d"\
-e "/TOR-BEGIN/d" -e "/TOR-END/d"\
-e "/TINC-BEGIN/d" -e "/TINC-END/d"\
-e "/PARAGON-BEGIN/d" -e "/PARAGON-END/d"\
-e "/TUXERA-BEGIN/d" -e "/TUXERA-END/d"\
-e "/MICROSD-BEGIN/d" -e "/MICROSD-END/d"\
-e "/MULTIWAN-BEGIN/d" -e "/MULTIWAN-END/d"\
-e "/DUALWAN-BEGIN/d" -e "/DUALWAN-END/d"\
|| true; \
done
# Use HTML compressor to compress HTML as much as possible sed -r -i "s,//\s?<%(.*)%>,/*! @preserve: \1*/," $$F &&
cd $(INSTALLDIR)/www && \
for F in $(wildcard *.asp ); do \
[ -f $(INSTALLDIR)/www/$$F ] && \
$(TOP)/www/tools/node_modules/.bin/html-minifier $$F --minify-css -o $$F || true; \
done
# Remove all javascript multiline comments in asp files
cd $(INSTALLDIR)/www && \
for F in $(wildcard *.asp *.html); do \
[ -f $(INSTALLDIR)/www/$$F ] && sed -i $$F \
-e :a -re 's%(.*)/\*.*\*/%\1%; ta; /\/\*/ !b; N; ba' \
|| true; \
done
# Compress JAVASCRIPT files
cd $(INSTALLDIR)/www && \
for F in $(wildcard js/*.js *.js ); do \
[ -f $(INSTALLDIR)/www/$$F ] && $(TOP)/www/tools/node_modules/.bin/uglifyjs $$F -c -o $$F || true; \
done
# Compress CSS files
cd $(INSTALLDIR)/www && \
for F in $(wildcard css/schemes/*.css css/*.css *.css ); do \
[ -f $(INSTALLDIR)/www/$$F ] && $(TOP)/www/tools/node_modules/.bin/uglifycss $$F --output $$F || true; \
done
# make sure old and debugging crap is gone
@rm -f $(INSTALLDIR)/www/debug.js
@rm -f $(INSTALLDIR)/www/*-x.*
@rm -f $(INSTALLDIR)/www/*-old.*
@rm -f $(INSTALLDIR)/www/color.css
@rm -f $(INSTALLDIR)/www/authorization.asp
# secure the files in the installdir and change file ACLs (and preserve the existing folder ACLs)
# chmod 0644 $(INSTALLDIR)/www/*
find $(INSTALLDIR)/www/ -type f -print0 | xargs -0 chmod 644