summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1999-10-26 14:14:37 +0200
committerWerner Koch <wk@gnupg.org>1999-10-26 14:14:37 +0200
commitcf70ca8d68eb836b952f2c234f064b1afc205962 (patch)
treeaa33afbc79efd1f8538e5286b13d900321a8f14b /scripts
parentChanged the way it works - now needs an extra program to to most tasks. (diff)
downloadgnupg2-cf70ca8d68eb836b952f2c234f064b1afc205962.tar.xz
gnupg2-cf70ca8d68eb836b952f2c234f064b1afc205962.zip
See ChangeLog: Tue Oct 26 14:10:21 CEST 1999 Werner Koch
Diffstat (limited to 'scripts')
-rw-r--r--scripts/ChangeLog5
-rwxr-xr-xscripts/commit28
-rwxr-xr-xscripts/mksnapshot2
3 files changed, 25 insertions, 10 deletions
diff --git a/scripts/ChangeLog b/scripts/ChangeLog
index ce00b3698..e74205530 100644
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,8 @@
+Tue Oct 26 14:10:21 CEST 1999 Werner Koch <wk@gnupg.de>
+
+ * commit: Remove leading and trailing empty lines when copying
+ Changes to Changelog
+
Wed Sep 15 16:22:17 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
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
diff --git a/scripts/mksnapshot b/scripts/mksnapshot
index cca19d98d..7b534b98c 100755
--- a/scripts/mksnapshot
+++ b/scripts/mksnapshot
@@ -21,7 +21,7 @@ This is a snapshot of the current CVS head branch!
It may not compile or not work. Please don't report
bugs about this snapshot release it is just for your
-convenience and to reduce the load of out CVS server.
+convenience and to reduce the load of our CVS server.
Thanks,