source: to-imperative/trunk/createlog @ 691

Last change on this file since 691 was 409, checked in by pooh, 18 years ago
  • Hopefully finally get rid of annoying ./ in filenames.
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1003 bytes
Line 
1#!/bin/sh
2
3logfile="ChangeLog"
4
5(
6
7dir=`dirname $0`
8cd ${dir}
9module=`basename \`pwd\``
10cvsroot=`cat CVS/Root | sed 's/.*://g;s/\/$//g'`
11module=${cvsroot}/`cat CVS/Repository`
12
13if [ -f changelog.date ] ; then
14  dateopt="-r -d \">`cat changelog.date`\""
15fi
16
17rcsscript=`mktemp /tmp/createlog.XXXXXX`
18
19uopt=
20if [ -f Developers ] ; then
21  uopt="`cat Developers | sed 's/^/-u "/g;s/$/\"/g'`"
22fi
23echo "#!/bin/sh" >${rcsscript}
24echo xargs rcs2log ${uopt} ${dateopt} >>${rcsscript}
25chmod +x ${rcsscript}
26
27(
28  for i in `find . -path "*CVS/Entries"` ; do
29    d=`dirname \`dirname $i\``
30    for e in `cat $i | grep -v "$logfile" | grep '^/' | cut -f 2 -d '/'` ; do
31      echo $d/$e
32    done
33  done
34) | sed 's,^\./,,g' | ${rcsscript} | \
35sed "s,${module}/,,g" | \
36sed "`echo -e 's/: - /:\\\\\n\t- /;s/\t-/\\\\\n\t-/'`" | fmt | sed '/^$/d' | \
37gawk 'BEGIN{ x = 1; }/^[0-9]/{ if (x != 1) printf "\n"; x = 0; }/\t\*/{ printf "\n"; }//{print $0; }' >${logfile}
38
39cvs -z3 commit -m "" "${logfile}"
40
41rm -f ${rcsscript}
42
43)
Note: See TracBrowser for help on using the repository browser.