1 | #!/bin/bash
|
---|
2 |
|
---|
3 | if [ ! -d main-form/images ] ; then
|
---|
4 | echo "Error: Unable to find 'main-form/images'. Have you run UNZIP.sh?" 1>&2
|
---|
5 | exit
|
---|
6 | fi
|
---|
7 |
|
---|
8 | config_file="nz-flag-design.xml"
|
---|
9 |
|
---|
10 | echo ""
|
---|
11 | echo "****"
|
---|
12 | echo "* 1. Making 'render-3d/images/' world-writable to ensure web server can write to it"
|
---|
13 | echo "* and also the top-levle 'published' folder"
|
---|
14 | echo "* => chmod a+rwx render-3d/images"
|
---|
15 | echo "* => chmod a+rwx published"
|
---|
16 | #echo "* => chmod a+rw render-3d/images/*.png"
|
---|
17 | echo "****"
|
---|
18 | chmod a+rwx render-3d/images/
|
---|
19 | chmod a+rwx published
|
---|
20 | #chmod a+rw render-3d/images/*.png
|
---|
21 |
|
---|
22 | echo ""
|
---|
23 | echo "****"
|
---|
24 | echo "* 2. Making 'similarity-2d' world-writable so web server can save JSON data there"
|
---|
25 | echo "* => chmod a+rwx similarity-2d"
|
---|
26 | echo "* => chmod a+rwx similarity-2d/json-data"
|
---|
27 | echo "****"
|
---|
28 | chmod a+rwx similarity-2d
|
---|
29 | chmod a+rwx similarity-2d/json-data
|
---|
30 |
|
---|
31 | echo ""
|
---|
32 | echo "****"
|
---|
33 | echo "* 3. Copying local extension files to SVG-Edit folder"
|
---|
34 | echo "****"
|
---|
35 | for f in main-form/svg-edit-local/* ; do
|
---|
36 | if [ -f $f ] ; then
|
---|
37 | /bin/cp $f main-form/svg-edit-trunk/editor/.
|
---|
38 | fi
|
---|
39 | done
|
---|
40 |
|
---|
41 | /bin/cp -r main-form/svg-edit-local/extensions/* main-form/svg-edit-trunk/editor/extensions/.
|
---|
42 |
|
---|
43 |
|
---|
44 | echo "<Context path=\"/nz-flag-design\"" > "$config_file"
|
---|
45 | echo " useHttpOnly=\"false\"" >> "$config_file"
|
---|
46 | echo " docBase=\""`pwd`"\"" >> "$config_file"
|
---|
47 | echo " debug=\"1\" reloadable=\"true\"" >> "$config_file"
|
---|
48 | echo " allowLinking=\"true\">" >> "$config_file"
|
---|
49 | echo " <Manager pathname=\"SESSIONS.ser\" />" >> "$config_file"
|
---|
50 | echo "</Context>" >> "$config_file"
|
---|
51 |
|
---|
52 | #echo ""
|
---|
53 | echo "+++ ... Done"
|
---|
54 | #echo ""
|
---|
55 |
|
---|
56 | echo "****"
|
---|
57 | echo "* 4. Now copy:"
|
---|
58 | echo "* $config_file"
|
---|
59 | echo "* to:"
|
---|
60 | echo "* <tomcat-home>/conf/Catalina/localhost/$config_file"
|
---|
61 | echo "****"
|
---|
62 |
|
---|
63 |
|
---|