head	1.3;
access;
symbols;
locks; strict;
comment	@# @;


1.3
date	2001.07.30.18.44.24;	author leonardr;	state dead;
branches;
next	1.2;

1.2
date	2001.05.24.19.50.47;	author dlr;	state Exp;
branches;
next	1.1;

1.1
date	2001.05.24.19.04.59;	author dlr;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Moved stuff from 1.1.0 migration directory to 1.2.0 directory to reflect actual future versioning.
@
text
@#!/bin/sh
# Converts templates from a single path template engine to a multi-path
# template engine.  Should be run against Velocity templates.

if [ "${1}" ]; then
    dir_to_convert="${1}"
else
    dir_to_convert='.'
fi

for f in `find ${dir_to_convert} -name '*.vm'`; do
    perl -pi -e 's/(\#(parse|include)\( \")\$\{?BRAND_TEMPLATE_ROOT\}?\//$1/g' ${f}
      
    perl -pi -e 's/(\#(parse|include)\( \")\$\{?SERVLET_TEMPLATE_ROOT\}?\//$1/g' ${f}
    perl -pi -e 's/(\#(parse|include)\( \")\$\{?SANDBOX\}?\/helm\/templates\//$1/g' ${f}
done
unset f
@


1.2
log
@Added a little header doc and swapped in multiple calls to Perl for
multiple -e's.
@
text
@@


1.1
log
@Converts templates from a single path template engine to a multi-path
template engine.  This script should be run by hand when migrating
instances to Velocity templates.
@
text
@d3 1
a3 1
# template engine.
d12 4
a15 5
    perl -pi \
      -e 's/(\#(parse|include)\( \")\$\{?BRAND_TEMPLATE_ROOT\}?\//$1/g' \
      -e 's/(\#(parse|include)\( \")\$\{?SERVLET_TEMPLATE_ROOT\}?\//$1/g' \
      -e 's/(\#(parse|include)\( \")\$\{?SANDBOX\}?\/helm\/templates\//$1/g' \
      $f
@

