anchor.diff:  			ln -sf $j ${cfg.baseDir}/lib/`basename $j`
   		    done
   		fi
  -	    done 
  +	    done	    	     
   
   	    # Symlink all the given shared libs files or paths into the shared/lib/ directory
   	    for i in ${toString cfg.sharedLibs}
  
positive.code: 	    mkdir -p ${cfg.baseDir}/conf
  	    chown ${cfg.user}:${cfg.group} ${cfg.baseDir}/conf
  	    
  	    # Symlink the config files in the conf/ directory (except for catalina.properties)
  	    for i in $(ls ${pkgs.tomcat6}/conf | grep -v catalina.properties)
  	    do
  	        ln -sf ${pkgs.tomcat6}/conf/$i ${cfg.baseDir}/conf/`basename $i`
  	    done
  
negative.code: 		        ln -sf $j ${cfg.baseDir}/webapps/`basename $j`
  		    done
  		fi
  	    done	    	    
  	    
  	    ${toString (map (virtualHost: ''
  	      # Create webapps directory for the virtual host
  	      mkdir -p ${cfg.baseDir}/virtualhosts/${virtualHost.name}/webapps
  	      
  	      # Modify ownership
  	      chown ${cfg.user}:${cfg.group} ${cfg.baseDir}/virtualhosts/${virtualHost.name}/webapps
  	      
  	      # Symlink all the given web applications files or paths into the webapps/ directory
  	      # of this virtual host
  	      for i in ${toString virtualHost.webapps}
  	      do
  		  if [ -f $i ]
  		  then
  		      # If the given web application is a file, symlink it into the webapps/ directory
  		      ln -sf $i ${cfg.baseDir}/virtualhosts/${virtualHost.name}/webapps/`basename $i`
  		  elif [ -d $i ]
  		  then
  		      # If the given web application is a directory, then iterate over the files
  		      # in the special purpose directories and symlink them into the tomcat tree
  		    
  		      for j in $i/webapps/*
  		      do
  		          ln -sf $j ${cfg.baseDir}/virtualhosts/${virtualHost.name}/webapps/`basename $j`
  		      done
                    fi	                  
  	      done
  	      
  	      ''
  	    ) cfg.virtualHosts) }
  	    
  	    # Create a work/ directory
  	    mkdir -p ${cfg.baseDir}/work
  