| 1 |
#!/bin/sh |
| 2 |
# This script prepares CS documentation for online publication by adding |
| 3 |
# user-annotation capability. |
| 4 |
|
| 5 |
DIRS=$@ |
| 6 |
EFED="perl Utilities/efed.pl" |
| 7 |
|
| 8 |
for d in $DIRS; do |
| 9 |
if test -d $d; then |
| 10 |
echo "Preparing $d for annotation capability." |
| 11 |
$EFED -d \ |
| 12 |
-a "/^(.*)\.html/" \ |
| 13 |
-r "html=php" \ |
| 14 |
-e "s/href *= *\"(?!http\:\/\/)([^\"]*)\.html([^\"]*)\"/href=\"\$1.php\$2\"/gi" \ |
| 15 |
-e "s:<title>(.*)</title>:<title>\$1</title><?php \\\$theme=\"\$1\"; ?>:i" \ |
| 16 |
-e "s:</body>:<?php require(\"annotate.php\"); ?></body>:i" \ |
| 17 |
$d |
| 18 |
cp Utilities/*.php $d |
| 19 |
fi |
| 20 |
done |