Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleaddTomcatNatures.tcsh
#!/bin/tcsh
foreach file ( `find . -name .tomcatplugin -exec dirname {} \; | awk -F'/' '{print $NF}'` )
        sed -i.bak -r "{s/<warLocation>.*<\/warLocation>/<warLocation>\/usr\/local\/tomcat\/webapps\/sakai-$file.war<\/warLocation>/}" \
./$file/.tomcatplugin
        sed -i.bak2 -r "{s/<webPath>.*<\/webPath>/<webPath>\/sakai-$file.war<\/webPath>/}" \
./$file/.tomcatplugin
end

foreach file ( `find . -name .project -print` )
        sed -i.bak3 -r \
"{s/(\s+)(<nature>org.eclipse.jdt.core.javanature<\/nature>)/\1\2\n\1<nature>com.sysdeo.eclipse.tomcat.tomcatnature<\/nature>/}" \
$file

end

... be sure to change the \/usr\/local\/tomcat (the '/' chars are necessary additions) reference to match your tomcat install.

...