Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / src / core / test / unit / build.sh
1 #!/bin/sh
2 echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
3   \"http://www.w3.org/TR/html4/loose.dtd\">
4 <html>
5     <head>
6         <title>Jasmine Test Runner - Platform Core</title>
7             <link rel=\"stylesheet\" type=\"text/css\" href=\"../../../../testreporter/deploy/testreporter/resources/reporter.css\">
8             <script type=\"text/javascript\" src=\"../../../../testreporter/deploy/testreporter/reporter.js\"></script>
9         </head>
10         <body>
11             <script type=\"text/javascript\">
12                             Test.SandBox.setup({
13                                     includes: [{ type: \"js\", src: \"../../../../testreporter/deploy/testreporter/jasmine.js\" },"  > index.html
14
15 # Add ext-core include        
16 sed 's/\.\.\/platform\/core/\.\./' ../../../../extjs/build/sdk.jsb3 | grep "path" | tr -d '"' | tr -d "," | tr -d "}" > dump.tmp
17
18 cat dump.tmp | awk '{    
19     path = $2 $4;
20     print "                               { type: \"js\", src: \"" path "\" },";
21     if (path == "../../src/class/Loader.js") {
22         print "                               { type: \"js\", src: \"resources/BlockLoader.js\" },";
23     }
24 }'  >> index.html
25 rm dump.tmp
26
27 # Add env files
28 find ../../src/env -name *.js | awk '{print "                               { type: \"js\", src: \"" $0 "\" },";}'  >> index.html
29
30 echo "                               { type: \"js\", src: \"resources/EventUtils.js\" }," >> index.html
31         
32 # Add specs include
33 find spec -name "*.js" > dump.tmp
34 lastRec=`awk 'END{print NR}' dump.tmp`
35 awk -v aLastRec="$lastRec" '{
36     if (NR == aLastRec) {
37         print "                               { type: \"js\", src: \"" $0 "\" }]";
38     } else {
39         print "                               { type: \"js\", src: \"" $0 "\" },";
40     }
41
42 }' dump.tmp >> index.html
43
44 rm dump.tmp
45 echo "                });
46
47         </script>
48     </body>
49 </html>" >> index.html