jvanzyl     00/10/21 18:52:10

  Added:       convert  convert-wm.sh convert.wm
  Log:
  - scripts for easy WM to Velocity migration.
  
  Revision  Changes    Path
  1.1                  jakarta-velocity/convert/convert-wm.sh
  
  Index: convert-wm.sh
  ===================================================================
  #!/bin/sh
  
  [ -z $1 ] && echo \
            && echo "Need a template or a directory of templates to convert!" \
            && echo \
            && exit
  
  CLASSPATH=../bin/velocity-0.4.jar
  
  java -cp ${CLASSPATH} org.apache.velocity.convert.WebMacro $1
  
  
  
  1.1                  jakarta-velocity/convert/convert.wm
  
  Index: convert.wm
  ===================================================================
  ## This is a template to convert.
  
  #foreach $this in $that
  #begin
      This is the text
  #end
  
  #foreach $this in $that
  {
      This is the text
  }
  
  #if ($foo)
  #begin
      convert me!
  #end
  #else
  #begin
      convert me too!
  #end    
  
  #if ($foo)
  {
      convert me!
  }    
  #else
  {
      convert me too!
  }    
  
  #parse "whatever.wm"
  
  
  

Reply via email to