Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 60459 invoked from network); 17 Mar 2006 17:35:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Mar 2006 17:35:20 -0000 Received: (qmail 37160 invoked by uid 500); 17 Mar 2006 17:35:19 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 36799 invoked by uid 500); 17 Mar 2006 17:35:17 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 36788 invoked by uid 99); 17 Mar 2006 17:35:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Mar 2006 09:35:17 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [128.131.2.110] (HELO mr.tuwien.ac.at) (128.131.2.110) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Mar 2006 09:35:14 -0800 Received: from [127.0.0.1] (v218-075.vps.tuwien.ac.at [128.131.218.75]) by mr.tuwien.ac.at (8.13.1/8.13.1) with ESMTP id k2HHYljK001074 for ; Fri, 17 Mar 2006 18:34:48 +0100 (MET) Message-ID: <441AF320.7010903@student.tuwien.ac.at> Date: Fri, 17 Mar 2006 18:34:24 +0100 From: Andreas Hochsteger User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Script for m10n of blocks (was Re: [RT] a simple release plan) References: <44183A19.5080908@apache.org> <441880E3.90303@nada.kth.se> <4419812E.5010404@apache.org> <44198C1E.8000003@dslextreme.com> <44199130.9000503@luminas.co.uk> <4419A9FA.4060401@dslextreme.com> <4419DAA7.7070105@nada.kth.se> <441A8891.4050402@student.tuwien.ac.at> <441A96C1.9020406@odoko.co.uk> <441AB56F.7080104@student.tuwien.ac.at> <441ABF6B.6040303@apache.org> <441AC315.9080809@student.tuwien.ac.at> <441AC5F1.4070101@apache.org> <441ADB27.2070202@student.tuwien.ac.at> <441ADF33.2030007@student.tuwien.ac.at> <441AE27D.5040006@apache.org> In-Reply-To: <441AE27D.5040006@apache.org> Content-Type: multipart/mixed; boundary="------------040700070801030203020503" X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --------------040700070801030203020503 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reinhard Poetz schrieb: > Andreas Hochsteger wrote: > >> After analyzing the old blocks in more details I found the following >> common directories. >> It would be great, if you (or someone else involved in developing the >> new blocks) can finish the mapping below ... > > ok, forget my last response. I'll change it in some points: > >> WEB-INF/sitemap-additions -> ? (contains sitemap snippets in *.xconf >> files) > > cocoon--impl/src/main/resources/META-INF/legacy/sitemap-additions > >> WEB-INF/xconf -> cocoon--impl/src/main/resources/META-INF/xconf? > > cocoon--impl/src/main/resources/META-INF/legacy/xconf > >> conf -> ? (contains *.xweb, *.properties and other files) > > cocoon--impl/src/main/resources/META-INF/legacy/conf > >> java -> cocoon--impl/src/main/java > > ok > >> samples -> cocoon--sample/src/main/resources/COB-INF > > ok > >> test -> cocoon--impl/src/test/java > > ok > > The idea is to collect all old configuration files within one directory. > I called it legacy - if somebody has a better name, it would be the > right time now to let us know ;-) > Thanks, Reinhard, this really helped me very much! Attached is a new version which uses the mappings from above. The SVN-Commands are already added but commented-out and replaced with copy commands to be easier to test. One question popped up during testing: Is it really required to move the directories? Isn't it better to do a 'svn cp' (which is a cheap copy anyway) and keep the old blocks at their old location? This way it would be better to test and experiment since moving may disrupt both the cocoon-trunk and blocks repository (which is also used by 2.1 if I'm not mistaken). It would be great, if somebody could try the script and give me some more feedback. Only 2 variables have to be adjusted: * blksrc: Local directory where https://svn.apache.org/repos/asf/cocoon/blocks is checked out * blkdest: Local directory where https://svn.apache.org/repos/asf/cocoon/trunk is checked out Usage: ./m10n-blocks.sh ... Example: ./m10n-blocks.sh asciiart faces The script is written using standard Unix Shell and is tested on WinXP using Cygwin. Thanks, Andreas --------------040700070801030203020503 Content-Type: text/plain; name="m10n-blocks.sh" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="m10n-blocks.sh" #!/bin/sh # Author: Andreas Hochsteger # Description: # This script partly automates the conversion of the directory structure # of the "old" blocks to the "mavenized" blocks. # Usage: m10n-blocks.sh ... # Local directory where https://svn.apache.org/repos/asf/cocoon/blocks is checked out: blksrc=cocoon-blocks # Local directory where https://svn.apache.org/repos/asf/cocoon/trunk is checked out: blkdest=cocoon-trunk # List of blocks (old name) to be converted - read from the command line: blocks="$@" # Argument: function MoveDir() { if [ -d $1 ]; then echo "Moving $1 to $2 ..." # TODO: This is just for testing: cp -r $1 $2 # TODO: Replace cp from above with svn command: #svn mv $1 $2 fi } # Argument: function ConvertBlock() { block="$1" blockbase=$blkdest/cocoon-$block # Create initial directory structure: mkdir -p $blockbase/cocoon-$block-impl/src/main/resources/META-INF/legacy mkdir -p $blockbase/cocoon-$block-impl/src/test mkdir -p $blockbase/cocoon-$block-sample/src/main/resources # TODO: Add initial directory structure to svn: #svn add $blockbase # Move Java sources: MoveDir $blksrc/$block/trunk/java $blockbase/cocoon-$block-impl/src/main/java # Move Java test sources: MoveDir $blksrc/$block/trunk/test $blockbase/cocoon-$block-impl/src/test/java # Move xconf resources: MoveDir $blksrc/$block/trunk/WEB-INF/xconf $blockbase/cocoon-$block-impl/src/main/resources/META-INF/legacy/xconf # Move sitemap-additions resources: MoveDir $blksrc/$block/trunk/WEB-INF/sitemap-additions $blockbase/cocoon-$block-impl/src/main/resources/META-INF/legacy/sitemap-additions # Move WEB-INF resources: MoveDir $blksrc/$block/trunk/conf $blockbase/cocoon-$block-impl/src/main/resources/META-INF/legacy/conf # Move sample resources: MoveDir $blksrc/$block/trunk/samples $blockbase/cocoon-$block-sample/src/main/resources/COB-INF } # Convert the blocks: for b in $blocks; do echo "Converting block $block ..." ConvertBlock $b echo done --------------040700070801030203020503--