#!/bin/bash if [ ! -d main-form/images ] ; then echo "Error: Unable to find 'main-form/images'. Have you run UNZIP.sh?" 1>&2 exit fi config_file="nz-flag-design.xml" echo "" echo "****" echo "* 1. Making 'render-3d/images/' world-writable to ensure web server can write to it" echo "* and also the top-levle 'published' folder" echo "* => chmod a+rwx render-3d/images" echo "* => chmod a+rwx published" #echo "* => chmod a+rw render-3d/images/*.png" echo "****" chmod a+rwx render-3d/images/ chmod a+rwx published #chmod a+rw render-3d/images/*.png echo "" echo "****" echo "* 2. Making 'similarity-2d' world-writable so web server can save JSON data there" echo "* => chmod a+rwx similarity-2d" echo "* => chmod a+rwx similarity-2d/json-data" echo "****" chmod a+rwx similarity-2d chmod a+rwx similarity-2d/json-data echo "" echo "****" echo "* 3. Copying local extension files to SVG-Edit folder" echo "****" for f in main-form/svg-edit-local/* ; do if [ -f $f ] ; then /bin/cp $f main-form/svg-edit-trunk/editor/. fi done /bin/cp -r main-form/svg-edit-local/extensions/* main-form/svg-edit-trunk/editor/extensions/. docBase=`pwd` cygpath -h > /dev/null if [ $? == 0 ] ; then docBase=`cygpath -w $docBase` fi echo " "$config_file" echo " useHttpOnly=\"false\"" >> "$config_file" echo " docBase=\"$docBase\"" >> "$config_file" echo " debug=\"1\" reloadable=\"true\"" >> "$config_file" echo " allowLinking=\"true\">" >> "$config_file" echo " " >> "$config_file" echo "" >> "$config_file" #echo "" echo "+++ ... Done" #echo "" echo "****" echo "* 4. Now copy:" echo "* $config_file" echo "* to:" echo "* /conf/Catalina/localhost/$config_file" echo "****"