File: genshtml

package info (click to toggle)
libpj-java 0.0~20150107%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,388 kB
  • sloc: java: 99,543; ansic: 987; sh: 153; xml: 26; makefile: 13; sed: 4
file content (22 lines) | stat: -rw-r--r-- 543 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

if [[ "$1" == "" ]]
then
	echo "Usage: genshtml dd-mmm-yyyy"
	exit 1
fi

TOPDIR=/home/ark/public_html/pj
#TOPDIR=/home/ark/books/bpp/pj
SRCDIR=${TOPDIR}/lib

echo "Removing old shtml files..."
find $SRCDIR -name '*.shtml' -exec rm '{}' ';'

echo "Generating new shtml files..."
for JAVAFILE in `find $SRCDIR -name '*.java'`
do
	SHTMLFILE=`echo $JAVAFILE | sed -e "s/\.java/\.shtml/"`
	CLASS=`echo $JAVAFILE | sed -e "s/.*\///" -e "s/\.java//"`
	sed -e "s/CLASS/$CLASS/" -e "s/01-Jan-2007/$1/" $TOPDIR/Java.shtml > $SHTMLFILE
done