diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/ChangeLog | 10 | ||||
-rwxr-xr-x | scripts/commit | 28 |
2 files changed, 24 insertions, 14 deletions
diff --git a/scripts/ChangeLog b/scripts/ChangeLog index ce00b3698..e9791e45c 100644 --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,28 +1,28 @@ -Wed Sep 15 16:22:17 CEST 1999 Werner Koch <[email protected]> +Thu Sep 23 09:49:25 1999 Werner Koch ([email protected]) + + * commit: Remove leading and trailing empty lines when copying + Changes to Changelog +Wed Sep 15 16:22:17 CEST 1999 Werner Koch <[email protected]> * gnupg.spec: Add Portuguese description Thu Sep 2 16:40:55 CEST 1999 Werner Koch <[email protected]> - * mkdiff: changed format of diff file name and made script more general. Wed Aug 4 10:34:18 CEST 1999 Werner Koch <[email protected]> - * config.guess: Updated from gnu/common and applied my emx patch again. * config.sub: Updated from gnu/common. Wed Jul 14 19:42:08 CEST 1999 Werner Koch <[email protected]> - * ltmain.sh, ltconfig.sh : Updated to libtool 1.3.3 Mon Jul 12 14:55:34 CEST 1999 Werner Koch <[email protected]> - * autogen.sh: Run libtoolize Sat May 22 22:47:26 CEST 1999 Werner Koch <[email protected]> diff --git a/scripts/commit b/scripts/commit index 992f93c3d..18a9b4aa7 100755 --- a/scripts/commit +++ b/scripts/commit @@ -11,15 +11,25 @@ addr="<`id -un`@`hostname -d`>" for i in `find . -name Changes -print`; do dir=`dirname $i` if [ -s $dir/Changes ]; then - lines=`wc -l <$dir/Changes` - echo "$date $name $addr" >$dir/ChangeLog.new - echo >>$dir/ChangeLog.new - cat $dir/Changes >>$dir/ChangeLog.new - [ -f $dir/ChangeLog ] && cat $dir/ChangeLog >>$dir/ChangeLog.new - echo -n > $dir/Changes - [ -f $dir/ChangeLog ] && rm $dir/ChangeLog - mv $dir/ChangeLog.new $dir/ChangeLog - echo "$lines new lines in $dir/ChangeLog" + awk ' + state == 0 && /^[ \t]*$/ { next } + state == 0 { state = 1 } + /^[ \t]*$/ { empty++; next } + { while ( empty > 0 ) { print ""; empty--; }; print } + ' < $dir/Changes > $dir/Changes.tmp + if [ -s $dir/Changes.tmp ]; then + lines=`wc -l <$dir/Changes.tmp` + echo "$date $name $addr" >$dir/ChangeLog.new + echo >>$dir/ChangeLog.new + cat $dir/Changes.tmp >>$dir/ChangeLog.new + echo >>$dir/ChangeLog.new + [ -f $dir/ChangeLog ] && cat $dir/ChangeLog >>$dir/ChangeLog.new + echo -n > $dir/Changes + [ -f $dir/ChangeLog ] && rm $dir/ChangeLog + mv $dir/ChangeLog.new $dir/ChangeLog + echo "$lines new lines in $dir/ChangeLog" + fi + rm $dir/Changes.tmp || true fi done |