Distinguish between rel_1_4 and trunk IDL
authordbs <dbs@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Sun, 15 Mar 2009 19:50:27 +0000 (19:50 +0000)
committerdbs <dbs@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Sun, 15 Mar 2009 19:50:27 +0000 (19:50 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/trunk@185 6d9bc8c9-1ec2-4278-b937-99fde70a366f

tools/patch_conifer.sh

index c410102..168fbcf 100644 (file)
@@ -3,7 +3,7 @@
 REMOTE_CANONICAL_SVN_DIR=svn://svn.open-ils.org/ILS/branches/rel_1_4
 CANONICAL_SVN_DIR=/home/opensrf/Evergreen-rel_1_4/Open-ILS
 CANONICAL_EXPORT_DIR=/home/opensrf/rel_1_4_export
-REMOTE_SVN_DIR=svn://svn.open-ils.org/ILS-Contrib/conifer/trunk
+REMOTE_SVN_DIR=svn://svn.open-ils.org/ILS-Contrib/conifer
 LOCAL_SVN_DIR=/home/opensrf/conifer-svn
 LOCAL_EXPORT_DIR=/home/opensrf/conifer-export
 INSTALL_DIR=/openils
@@ -42,14 +42,15 @@ copy_web_common()
 {
        # Copy the impossible-to-be-harmful (really!) Web stuff in place
        # Images
-       cp -r "$LOCAL_EXPORT_DIR"/web/opac/images/* "$INSTALL_DIR"/var/web/opac/images/.
+       cp -r "$LOCAL_EXPORT_DIR"/trunk/web/opac/images/* "$INSTALL_DIR"/var/web/opac/images/.
        # DTD files for replacement strings
-       cp -r "$LOCAL_EXPORT_DIR"/web/opac/locale/* "$INSTALL_DIR"/var/web/opac/locale/.
+       cp -r "$LOCAL_EXPORT_DIR"/trunk/web/opac/locale/* "$INSTALL_DIR"/var/web/opac/locale/.
 }
 
 copy_opac_skins()
 {
-       SKINS=`cd "$LOCAL_EXPORT_DIR"/web/opac/skin; ls -1`
+       SKINS=`cd "$LOCAL_EXPORT_DIR"/trunk/web/opac/skin; ls -1`
+       LINKS=`cd "$INSTALL_DIR"/var/web/opac/skin/default/; find xml -type l -print`
 
        # For skins, create a _test variation of each
        # Copy the default skin in place first, then copy our custom files over top
@@ -57,8 +58,15 @@ copy_opac_skins()
        for skin in $SKINS
        do
                rm -fr "$INSTALL_DIR"/var/web/opac/skin/"$skin"_test
-               cp -lr "$CANONICAL_EXPORT_DIR"/Open-ILS/web/opac/skin/default "$INSTALL_DIR"/var/web/opac/skin/"$skin"_test
-               cp -r "$LOCAL_EXPORT_DIR"/web/opac/skin/"$skin"/* "$INSTALL_DIR"/var/web/opac/skin/"$skin"_test/.
+               cp -r "$CANONICAL_EXPORT_DIR"/Open-ILS/web/opac/skin/default "$INSTALL_DIR"/var/web/opac/skin/"$skin"_test
+               cp -r "$LOCAL_EXPORT_DIR"/trunk/web/opac/skin/"$skin"/* "$INSTALL_DIR"/var/web/opac/skin/"$skin"_test/.
+
+               for xml_link in $LINKS
+               do
+                       cd "$INSTALL_DIR"/var/web/opac/skin/"$skin"_test/xml
+                       ln -sf index.xml `basename "$xml_link"`
+               done
+
                for munge_file in 'page_rdetail.xml'
                do
                        sed -i -e 's/skin\/default\/js/skin\/default_test\/js/' "$INSTALL_DIR"/var/web/opac/skin/"$skin"_test/xml/"$munge_file"
@@ -69,7 +77,7 @@ copy_opac_skins()
 # We'll need to restart Perl services after an update of circ rules
 copy_circ_rules()
 {
-       for circ_rule in `ls -1 "$LOCAL_EXPORT_DIR"/circ/*`
+       for circ_rule in `ls -1 "$LOCAL_EXPORT_DIR"/trunk/circ/*`
        do
                base_circ=`basename "$circ_rule"`
                if cmp "$circ_rule" "$LOCAL_EG_DIR"/var/circ/"$base_circ" &> /dev/null
@@ -85,9 +93,9 @@ copy_circ_rules()
 # And similarly, we might want to only trigger these manually
 copy_perl_modules()
 {
-       for perl_mod in `cd "$LOCAL_EXPORT_DIR"/src/perlmods/; find OpenILS -name "*.pm" -print0`
+       for perl_mod in `cd "$LOCAL_EXPORT_DIR"/trunk/src/perlmods/; find OpenILS -name "*.pm" -print0`
        do
-               if cmp "$LOCAL_EXPORT_DIR"/src/perlmods/"$perl_mod" "$LOCAL_EG_DIR"/lib/perl5/"$perl_mod" &> /dev/null
+               if cmp "$LOCAL_EXPORT_DIR"/trunk/src/perlmods/"$perl_mod" "$LOCAL_EG_DIR"/lib/perl5/"$perl_mod" &> /dev/null
                then echo -n
                else
                        cp --backup=numbered "$perl_mod" "$INSTALL_DIR"/lib/perl5/"$perl_mod"
@@ -103,12 +111,12 @@ copy_perl_modules()
 # And it could potentially break the whole thing.
 copy_conf_files()
 {
-       for conf in `ls -1 "$LOCAL_EXPORT_DIR"/conf/*`
+       for conf in `ls -1 "$LOCAL_EXPORT_DIR"/branches/rel_1_4/conf/*`
        do
-               if cmp "$LOCAL_EXPORT_DIR"/conf/"$conf" "$LOCAL_EG_DIR"/conf/"$conf" &> /dev/null
+               if cmp "$LOCAL_EXPORT_DIR"/branches/rel_1_4/conf/"$conf" "$LOCAL_EG_DIR"/conf/"$conf" &> /dev/null
                then echo -n
                else
-                       cp --backup=numbered "$LOCAL_EXPORT_DIR"/conf/"$conf" "$INSTALL_DIR"/conf/.
+                       cp --backup=numbered "$LOCAL_EXPORT_DIR"/branches/rel_1_4/conf/"$conf" "$INSTALL_DIR"/conf/.
                fi
        done
 }