source: to-imperative/trunk/createlog @ 1470

Last change on this file since 1470 was 1470, checked in by orlov, 17 years ago
  • Fixed problem with timezone in 'cvs log' output.
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.1 KB
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="-d \">`cat changelog.date`\""
15fi
16
17rcsscript=`mktemp /tmp/createlog.XXXXXX`
18rcslog=`mktemp /tmp/createlog.XXXXXX`
19
20uopt=
21if [ -f Developers ] ; then
22  uopt="`cat Developers | sed 's/^/-u "/g;s/$/\"/g'`"
23fi
24cat >${rcsscript} <<EOF
25#!/bin/sh
26f="\`cat\`"
27cvs log ${dateopt} \${f} | sed 's/ +0000;/;/' >${rcslog}
28rcs2log `echo ${uopt}` -L ${rcslog}
29EOF
30chmod +x ${rcsscript}
31
32(
33  for i in `find . -path "*CVS/Entries"` ; do
34    d=`dirname \`dirname $i\``
35    for e in `cat $i | grep -v "$logfile" | grep '^/' | cut -f 2 -d '/'` ; do
36      echo $d/$e
37    done
38  done
39) | sed 's,^\./,,g' | ${rcsscript} | \
40sed "s,${module}/,,g" | \
41sed "`echo -e 's/: - /:\\\\\n\t- /;s/\t-/\\\\\n\t-/'`" | fmt | sed '/^$/d' | \
42awk 'BEGIN{ x = 1; }/^[0-9]/{ if (x != 1) printf "\n"; x = 0; }/\t\*/{ printf "\n"; }//{print $0; }' >${logfile}
43
44cvs -z3 commit -m "" "${logfile}"
45
46rm -f ${rcsscript} ${rcslog}
47
48)
Note: See TracBrowser for help on using the repository browser.