head	1.3;
access;
symbols
	perseant-exfatfs-base-20261102:1.3
	netbsd-11-1-RELEASE:1.3
	netbsd-10-2-RELEASE:1.3
	netbsd-9-5-RELEASE:1.3
	netbsd-11-0-RELEASE:1.3
	netbsd-11-0-RC7:1.3
	netbsd-11-0-RC6:1.3
	netbsd-11-0-RC5:1.3
	netbsd-11-0-RC4:1.3
	netbsd-11-0-RC3:1.3
	netbsd-11-0-RC2:1.3
	netbsd-11-0-RC1:1.3
	perseant-exfatfs-base-20250801:1.3
	netbsd-11:1.3.0.56
	netbsd-11-base:1.3
	netbsd-10-1-RELEASE:1.3
	perseant-exfatfs-base-20240630:1.3
	perseant-exfatfs:1.3.0.54
	perseant-exfatfs-base:1.3
	netbsd-8-3-RELEASE:1.3
	netbsd-9-4-RELEASE:1.3
	netbsd-10-0-RELEASE:1.3
	netbsd-10-0-RC6:1.3
	netbsd-10-0-RC5:1.3
	netbsd-10-0-RC4:1.3
	netbsd-10-0-RC3:1.3
	netbsd-10-0-RC2:1.3
	netbsd-10-0-RC1:1.3
	netbsd-10:1.3.0.52
	netbsd-10-base:1.3
	netbsd-9-3-RELEASE:1.3
	cjep_sun2x-base1:1.3
	cjep_sun2x:1.3.0.50
	cjep_sun2x-base:1.3
	cjep_staticlib_x-base1:1.3
	netbsd-9-2-RELEASE:1.3
	cjep_staticlib_x:1.3.0.48
	cjep_staticlib_x-base:1.3
	netbsd-9-1-RELEASE:1.3
	phil-wifi-20200421:1.3
	phil-wifi-20200411:1.3
	is-mlppp:1.3.0.46
	is-mlppp-base:1.3
	phil-wifi-20200406:1.3
	netbsd-8-2-RELEASE:1.3
	netbsd-9-0-RELEASE:1.3
	netbsd-9-0-RC2:1.3
	netbsd-9-0-RC1:1.3
	phil-wifi-20191119:1.3
	netbsd-9:1.3.0.44
	netbsd-9-base:1.3
	phil-wifi-20190609:1.3
	netbsd-8-1-RELEASE:1.3
	netbsd-8-1-RC1:1.3
	pgoyette-compat-merge-20190127:1.3
	pgoyette-compat-20190127:1.3
	pgoyette-compat-20190118:1.3
	pgoyette-compat-1226:1.3
	pgoyette-compat-1126:1.3
	pgoyette-compat-1020:1.3
	pgoyette-compat-0930:1.3
	pgoyette-compat-0906:1.3
	netbsd-7-2-RELEASE:1.3
	pgoyette-compat-0728:1.3
	netbsd-8-0-RELEASE:1.3
	phil-wifi:1.3.0.42
	phil-wifi-base:1.3
	pgoyette-compat-0625:1.3
	netbsd-8-0-RC2:1.3
	pgoyette-compat-0521:1.3
	pgoyette-compat-0502:1.3
	pgoyette-compat-0422:1.3
	netbsd-8-0-RC1:1.3
	pgoyette-compat-0415:1.3
	pgoyette-compat-0407:1.3
	pgoyette-compat-0330:1.3
	pgoyette-compat-0322:1.3
	pgoyette-compat-0315:1.3
	netbsd-7-1-2-RELEASE:1.3
	pgoyette-compat:1.3.0.40
	pgoyette-compat-base:1.3
	netbsd-7-1-1-RELEASE:1.3
	matt-nb8-mediatek:1.3.0.38
	matt-nb8-mediatek-base:1.3
	perseant-stdc-iso10646:1.3.0.36
	perseant-stdc-iso10646-base:1.3
	netbsd-8:1.3.0.34
	netbsd-8-base:1.3
	prg-localcount2-base3:1.3
	prg-localcount2-base2:1.3
	prg-localcount2-base1:1.3
	prg-localcount2:1.3.0.32
	prg-localcount2-base:1.3
	pgoyette-localcount-20170426:1.3
	bouyer-socketcan-base1:1.3
	pgoyette-localcount-20170320:1.3
	netbsd-7-1:1.3.0.30
	netbsd-7-1-RELEASE:1.3
	netbsd-7-1-RC2:1.3
	netbsd-7-nhusb-base-20170116:1.3
	bouyer-socketcan:1.3.0.28
	bouyer-socketcan-base:1.3
	pgoyette-localcount-20170107:1.3
	netbsd-7-1-RC1:1.3
	pgoyette-localcount-20161104:1.3
	netbsd-7-0-2-RELEASE:1.3
	localcount-20160914:1.3
	netbsd-7-nhusb:1.3.0.26
	netbsd-7-nhusb-base:1.3
	pgoyette-localcount-20160806:1.3
	pgoyette-localcount-20160726:1.3
	pgoyette-localcount:1.3.0.24
	pgoyette-localcount-base:1.3
	netbsd-7-0-1-RELEASE:1.3
	netbsd-7-0:1.3.0.22
	netbsd-7-0-RELEASE:1.3
	netbsd-7-0-RC3:1.3
	netbsd-7-0-RC2:1.3
	netbsd-7-0-RC1:1.3
	netbsd-5-2-3-RELEASE:1.1.2.2
	netbsd-5-1-5-RELEASE:1.1.2.2
	netbsd-6-0-6-RELEASE:1.3
	netbsd-6-1-5-RELEASE:1.3
	netbsd-7:1.3.0.20
	netbsd-7-base:1.3
	yamt-pagecache-base9:1.3
	yamt-pagecache-tag8:1.3
	netbsd-6-1-4-RELEASE:1.3
	netbsd-6-0-5-RELEASE:1.3
	tls-earlyentropy:1.3.0.18
	tls-earlyentropy-base:1.3
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.3
	riastradh-drm2-base3:1.3
	netbsd-6-1-3-RELEASE:1.3
	netbsd-6-0-4-RELEASE:1.3
	netbsd-5-2-2-RELEASE:1.1.2.2
	netbsd-5-1-4-RELEASE:1.1.2.2
	netbsd-6-1-2-RELEASE:1.3
	netbsd-6-0-3-RELEASE:1.3
	netbsd-5-2-1-RELEASE:1.1.2.2
	netbsd-5-1-3-RELEASE:1.1.2.2
	netbsd-6-1-1-RELEASE:1.3
	riastradh-drm2-base2:1.3
	riastradh-drm2-base1:1.3
	riastradh-drm2:1.3.0.12
	riastradh-drm2-base:1.3
	netbsd-6-1:1.3.0.16
	netbsd-6-0-2-RELEASE:1.3
	netbsd-6-1-RELEASE:1.3
	netbsd-6-1-RC4:1.3
	netbsd-6-1-RC3:1.3
	agc-symver:1.3.0.14
	agc-symver-base:1.3
	netbsd-6-1-RC2:1.3
	netbsd-6-1-RC1:1.3
	yamt-pagecache-base8:1.3
	netbsd-5-2:1.1.2.2.0.6
	netbsd-6-0-1-RELEASE:1.3
	yamt-pagecache-base7:1.3
	netbsd-5-2-RELEASE:1.1.2.2
	netbsd-5-2-RC1:1.1.2.2
	matt-nb6-plus-nbase:1.3
	yamt-pagecache-base6:1.3
	netbsd-6-0:1.3.0.10
	netbsd-6-0-RELEASE:1.3
	netbsd-6-0-RC2:1.3
	tls-maxphys:1.3.0.8
	tls-maxphys-base:1.3
	matt-nb6-plus:1.3.0.6
	matt-nb6-plus-base:1.3
	netbsd-6-0-RC1:1.3
	yamt-pagecache-base5:1.3
	yamt-pagecache-base4:1.3
	netbsd-6:1.3.0.4
	netbsd-6-base:1.3
	netbsd-5-1-2-RELEASE:1.1.2.2
	netbsd-5-1-1-RELEASE:1.1.2.2
	yamt-pagecache-base3:1.3
	yamt-pagecache-base2:1.3
	yamt-pagecache:1.3.0.2
	yamt-pagecache-base:1.3
	cherry-xenmp:1.1.0.8
	cherry-xenmp-base:1.1
	bouyer-quota2-nbase:1.1
	bouyer-quota2:1.1.0.6
	bouyer-quota2-base:1.1
	matt-mips64-premerge-20101231:1.1
	matt-nb5-mips64-premerge-20101231:1.1.4.2
	matt-nb5-pq3:1.1.2.2.0.4
	matt-nb5-pq3-base:1.1.2.2
	netbsd-5-1:1.1.2.2.0.2
	netbsd-5-1-RELEASE:1.1.2.2
	netbsd-5-1-RC4:1.1.2.2
	matt-nb5-mips64-k15:1.1.4.2
	netbsd-5-1-RC3:1.1.2.2
	netbsd-5-1-RC2:1.1.2.2
	netbsd-5-1-RC1:1.1.2.2
	matt-nb5-mips64:1.1.0.4
	matt-premerge-20091211:1.1
	netbsd-5:1.1.0.2;
locks; strict;
comment	@# @;


1.3
date	2011.10.08.19.28.40;	author christos;	state Exp;
branches;
next	1.2;

1.2
date	2011.07.31.09.54.57;	author tron;	state Exp;
branches;
next	1.1;

1.1
date	2009.06.23.15.02.51;	author tron;	state Exp;
branches
	1.1.2.1
	1.1.4.1;
next	;

1.1.2.1
date	2009.06.23.15.02.51;	author snj;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	2009.09.15.06.01.40;	author snj;	state Exp;
branches;
next	;

1.1.4.1
date	2009.06.23.15.02.51;	author matt;	state dead;
branches;
next	1.1.4.2;

1.1.4.2
date	2010.04.21.05.23.22;	author matt;	state Exp;
branches;
next	;


desc
@@


1.3
log
@use cleantags, instead of home grown copy.
@
text
@#! /bin/sh
#
#	$NetBSD: postfix2netbsd,v 1.2 2011/07/31 09:54:57 tron Exp $
#
# Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# postfix2netbsd: adds NetBSD tag, removes unnecessary files and
# resolve symlinks for importing postfix tree into netbsd.
# works on current directory.

# postfix2netbsd: convert a postfix source tree into a
# format suitable for commit. Works on current dir.
#
# Seed from Wiz's grep2netbsd.

PROG="$(basename "$0")"
if [ -z "$1" -o -n "$2" ]
then
	echo "Usage: $PROG <dir>" 1>&2
	exit 1
fi
cd "$1"
# delete some superfluous files
echo deleting some superfluous files
find . \( -type f -o -type l \) -a \
	\( -name .indent.pro -o -name .printfck -o -name .keep \) \
	-exec rm {} \;
rm -rf bin include lib libexec man/cat? auxiliary
echo done

### ditch symlinks
find . -type l | while read t; do
	cp $t /tmp/postfix7$$   
	rm -f $t
	mv /tmp/postfix7$$ $t
	echo "resolved symlink $t"
done    

### Remove the $'s around RCS tags
cleantags .

### Add our NetBSD RCS Id
find . -type f -name '*.[chly]' -print | while read c; do
	sed 1q < $c | grep -q '\$NetBSD' || (
echo "/*	\$NetBSD\$	*/" >/tmp/postfix3$$
echo "" >>/tmp/postfix3$$
cat $c  >> /tmp/postfix3$$
mv /tmp/postfix3$$ $c && echo "added NetBSD RCS tag to $c"
	)
done

find man -type f -name '*.[0-9]' -print | while read m; do
	sed 1q < $m | grep -q '\$NetBSD' || (
echo ".\\\"	\$NetBSD\$" >/tmp/postfix4$$
echo ".\\\"" >>/tmp/postfix4$$
cat $m >> /tmp/postfix4$$
mv /tmp/postfix4$$ $m && echo "added NetBSD RCS tag to $m"
	)
done

find conf -type f \( -name '*.cf' -o -name 'post*' -o -name 'Makefile*' \) -print | while read t; do  
        grep -q '\$NetBSD' $t && continue
        sed 1q < $t | grep -q '^\#!'
        if [ $? -eq 0 ] ; then
		sed 1q < $t >/tmp/postfix5$$
		echo "#	\$NetBSD\$" >>/tmp/postfix5$$
		echo "#" >>/tmp/postfix5$$
		sed "1d" < $t >>/tmp/postfix5$$
        else
		echo "#	\$NetBSD\$" >/tmp/postfix5$$
		echo "#" >>/tmp/postfix5$$
		cat $t >> /tmp/postfix5$$
	fi
	mv /tmp/postfix5$$ $t && echo "added NetBSD RCS tag to $t"
done
echo done

VERSION=$(sed -n -e 's/^#define MAIL_VERSION_NUMBER.*"\(.*\)".*/\1/p' src/global/mail_version.h | tr . -)

echo You can import now.

echo Path: src/external/ibm-public/postfix/dist
echo Vendor: VENEMA
echo Versiontag: PFIX-${VERSION}

exit 0
@


1.2
log
@Automatically determine and print out the release tag for the import.
@
text
@d3 1
a3 1
#	$NetBSD: postfix2netbsd,v 1.1 2009/06/23 15:02:51 tron Exp $
d62 1
a62 9
find . -type f -print | xargs egrep -l '\$(Id|Created|Header|Revision|Source)' | while read f; do
	sed -e 's/\$\(Id.*\) ?\$/\1/' \
	    -e 's/\$\(Created.*\) \$/\1/' \
	    -e 's/\$\(Header.*\) \$/\1/' \
	    -e 's/\$\(Revision.*\) ?\$/\1/' \
	    -e 's/\$\(Source.*\) ?\$/\1/' \
	    $f > /tmp/postfix2$$ && mv /tmp/postfix2$$ $f && \
	echo "removed RCS tag from $f"
done
@


1.1
log
@Add makefile framework to build Postfix 2.6.2. Don't turn it on yet as
the Postfix 2.6.2 binary doesn't work yet because it cannot
find "/usr/libexec/postfix/postfix-script".
@
text
@d3 1
a3 1
#	$NetBSD: postfix2netbsd,v 1.14 2009/06/22 22:32:44 christos Exp $
d108 2
d114 1
a114 1
echo Versiontag: PFIX-X-Y-Z
@


1.1.4.1
log
@file postfix2netbsd was added on branch matt-nb5-mips64 on 2010-04-21 05:23:22 +0000
@
text
@d1 114
@


1.1.4.2
log
@sync to netbsd-5
@
text
@a0 114
#! /bin/sh
#
#	$NetBSD: postfix2netbsd,v 1.1.2.2 2009/09/15 06:01:40 snj Exp $
#
# Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# postfix2netbsd: adds NetBSD tag, removes unnecessary files and
# resolve symlinks for importing postfix tree into netbsd.
# works on current directory.

# postfix2netbsd: convert a postfix source tree into a
# format suitable for commit. Works on current dir.
#
# Seed from Wiz's grep2netbsd.

PROG="$(basename "$0")"
if [ -z "$1" -o -n "$2" ]
then
	echo "Usage: $PROG <dir>" 1>&2
	exit 1
fi
cd "$1"
# delete some superfluous files
echo deleting some superfluous files
find . \( -type f -o -type l \) -a \
	\( -name .indent.pro -o -name .printfck -o -name .keep \) \
	-exec rm {} \;
rm -rf bin include lib libexec man/cat? auxiliary
echo done

### ditch symlinks
find . -type l | while read t; do
	cp $t /tmp/postfix7$$   
	rm -f $t
	mv /tmp/postfix7$$ $t
	echo "resolved symlink $t"
done    

### Remove the $'s around RCS tags
find . -type f -print | xargs egrep -l '\$(Id|Created|Header|Revision|Source)' | while read f; do
	sed -e 's/\$\(Id.*\) ?\$/\1/' \
	    -e 's/\$\(Created.*\) \$/\1/' \
	    -e 's/\$\(Header.*\) \$/\1/' \
	    -e 's/\$\(Revision.*\) ?\$/\1/' \
	    -e 's/\$\(Source.*\) ?\$/\1/' \
	    $f > /tmp/postfix2$$ && mv /tmp/postfix2$$ $f && \
	echo "removed RCS tag from $f"
done

### Add our NetBSD RCS Id
find . -type f -name '*.[chly]' -print | while read c; do
	sed 1q < $c | grep -q '\$NetBSD' || (
echo "/*	\$NetBSD\$	*/" >/tmp/postfix3$$
echo "" >>/tmp/postfix3$$
cat $c  >> /tmp/postfix3$$
mv /tmp/postfix3$$ $c && echo "added NetBSD RCS tag to $c"
	)
done

find man -type f -name '*.[0-9]' -print | while read m; do
	sed 1q < $m | grep -q '\$NetBSD' || (
echo ".\\\"	\$NetBSD\$" >/tmp/postfix4$$
echo ".\\\"" >>/tmp/postfix4$$
cat $m >> /tmp/postfix4$$
mv /tmp/postfix4$$ $m && echo "added NetBSD RCS tag to $m"
	)
done

find conf -type f \( -name '*.cf' -o -name 'post*' -o -name 'Makefile*' \) -print | while read t; do  
        grep -q '\$NetBSD' $t && continue
        sed 1q < $t | grep -q '^\#!'
        if [ $? -eq 0 ] ; then
		sed 1q < $t >/tmp/postfix5$$
		echo "#	\$NetBSD\$" >>/tmp/postfix5$$
		echo "#" >>/tmp/postfix5$$
		sed "1d" < $t >>/tmp/postfix5$$
        else
		echo "#	\$NetBSD\$" >/tmp/postfix5$$
		echo "#" >>/tmp/postfix5$$
		cat $t >> /tmp/postfix5$$
	fi
	mv /tmp/postfix5$$ $t && echo "added NetBSD RCS tag to $t"
done
echo done

echo You can import now.

echo Path: src/external/ibm-public/postfix/dist
echo Vendor: VENEMA
echo Versiontag: PFIX-X-Y-Z

exit 0
@


1.1.2.1
log
@file postfix2netbsd was added on branch netbsd-5 on 2009-09-15 06:01:40 +0000
@
text
@d1 114
@


1.1.2.2
log
@Apply patch (requested by tron in ticket #944):
Update Postfix to 2.6.5.
@
text
@a0 114
#! /bin/sh
#
#	$NetBSD: postfix2netbsd,v 1.1 2009/06/23 15:02:51 tron Exp $
#
# Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# postfix2netbsd: adds NetBSD tag, removes unnecessary files and
# resolve symlinks for importing postfix tree into netbsd.
# works on current directory.

# postfix2netbsd: convert a postfix source tree into a
# format suitable for commit. Works on current dir.
#
# Seed from Wiz's grep2netbsd.

PROG="$(basename "$0")"
if [ -z "$1" -o -n "$2" ]
then
	echo "Usage: $PROG <dir>" 1>&2
	exit 1
fi
cd "$1"
# delete some superfluous files
echo deleting some superfluous files
find . \( -type f -o -type l \) -a \
	\( -name .indent.pro -o -name .printfck -o -name .keep \) \
	-exec rm {} \;
rm -rf bin include lib libexec man/cat? auxiliary
echo done

### ditch symlinks
find . -type l | while read t; do
	cp $t /tmp/postfix7$$   
	rm -f $t
	mv /tmp/postfix7$$ $t
	echo "resolved symlink $t"
done    

### Remove the $'s around RCS tags
find . -type f -print | xargs egrep -l '\$(Id|Created|Header|Revision|Source)' | while read f; do
	sed -e 's/\$\(Id.*\) ?\$/\1/' \
	    -e 's/\$\(Created.*\) \$/\1/' \
	    -e 's/\$\(Header.*\) \$/\1/' \
	    -e 's/\$\(Revision.*\) ?\$/\1/' \
	    -e 's/\$\(Source.*\) ?\$/\1/' \
	    $f > /tmp/postfix2$$ && mv /tmp/postfix2$$ $f && \
	echo "removed RCS tag from $f"
done

### Add our NetBSD RCS Id
find . -type f -name '*.[chly]' -print | while read c; do
	sed 1q < $c | grep -q '\$NetBSD' || (
echo "/*	\$NetBSD\$	*/" >/tmp/postfix3$$
echo "" >>/tmp/postfix3$$
cat $c  >> /tmp/postfix3$$
mv /tmp/postfix3$$ $c && echo "added NetBSD RCS tag to $c"
	)
done

find man -type f -name '*.[0-9]' -print | while read m; do
	sed 1q < $m | grep -q '\$NetBSD' || (
echo ".\\\"	\$NetBSD\$" >/tmp/postfix4$$
echo ".\\\"" >>/tmp/postfix4$$
cat $m >> /tmp/postfix4$$
mv /tmp/postfix4$$ $m && echo "added NetBSD RCS tag to $m"
	)
done

find conf -type f \( -name '*.cf' -o -name 'post*' -o -name 'Makefile*' \) -print | while read t; do  
        grep -q '\$NetBSD' $t && continue
        sed 1q < $t | grep -q '^\#!'
        if [ $? -eq 0 ] ; then
		sed 1q < $t >/tmp/postfix5$$
		echo "#	\$NetBSD\$" >>/tmp/postfix5$$
		echo "#" >>/tmp/postfix5$$
		sed "1d" < $t >>/tmp/postfix5$$
        else
		echo "#	\$NetBSD\$" >/tmp/postfix5$$
		echo "#" >>/tmp/postfix5$$
		cat $t >> /tmp/postfix5$$
	fi
	mv /tmp/postfix5$$ $t && echo "added NetBSD RCS tag to $t"
done
echo done

echo You can import now.

echo Path: src/external/ibm-public/postfix/dist
echo Vendor: VENEMA
echo Versiontag: PFIX-X-Y-Z

exit 0
@


