133fc0840Smbalmer#! /bin/sh 233fc0840Smbalmer# 3*7991f5a7Sandvar# $NetBSD: lua2netbsd,v 1.3 2021/07/24 21:31:31 andvar Exp $ 433fc0840Smbalmer# adapted from dist/ipf/ipf2netbsd: 533fc0840Smbalmer# NetBSD: ipf2netbsd,v 1.23 2010/04/17 22:05:53 darrenr Exp $ 633fc0840Smbalmer# 733fc0840Smbalmer# Copyright (c) 1999 The NetBSD Foundation, Inc. 833fc0840Smbalmer# All rights reserved. 933fc0840Smbalmer# 1033fc0840Smbalmer# Redistribution and use in source and binary forms, with or without 1133fc0840Smbalmer# modification, are permitted provided that the following conditions 1233fc0840Smbalmer# are met: 1333fc0840Smbalmer# 1. Redistributions of source code must retain the above copyright 1433fc0840Smbalmer# notice, this list of conditions and the following disclaimer. 1533fc0840Smbalmer# 2. Redistributions in binary form must reproduce the above copyright 1633fc0840Smbalmer# notice, this list of conditions and the following disclaimer in the 1733fc0840Smbalmer# documentation and/or other materials provided with the distribution. 1833fc0840Smbalmer# 1933fc0840Smbalmer# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2033fc0840Smbalmer# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2133fc0840Smbalmer# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2233fc0840Smbalmer# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2333fc0840Smbalmer# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2433fc0840Smbalmer# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2533fc0840Smbalmer# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2633fc0840Smbalmer# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2733fc0840Smbalmer# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2833fc0840Smbalmer# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2933fc0840Smbalmer# POSSIBILITY OF SUCH DAMAGE. 3033fc0840Smbalmer# 31*7991f5a7Sandvar# lua2netbsd: prepare a Lua source tree for NetBSD. 3233fc0840Smbalmer 3333fc0840Smbalmer### Remove the $'s around various RCSIDs 346ee25ca9Schristoscleantags src doc 3533fc0840Smbalmer 3633fc0840Smbalmer### Add our NetBSD RCS Id 3733fc0840Smbalmerfind src -type f -name '*.[ch]' -print | while read c; do 3833fc0840Smbalmer sed 1q < $c | grep -q '\$NetBSD' || ( 3933fc0840Smbalmerecho "/* \$NetBSD\$ */" >/tmp/lua2n$$ 4033fc0840Smbalmerecho "" >>/tmp/lua2n$$ 4133fc0840Smbalmercat $c >> /tmp/lua2n$$ 4233fc0840Smbalmermv /tmp/lua2n$$ $c && echo added RCS tag to $c 4333fc0840Smbalmer ) 4433fc0840Smbalmerdone 4533fc0840Smbalmer 4633fc0840Smbalmerfind doc -type f -name '*.[0-9]' -print | while read m; do 4733fc0840Smbalmer sed 1q < $m | grep -q '\$NetBSD' || ( 4833fc0840Smbalmerecho ".\\\" \$NetBSD\$" >/tmp/lua2m$$ 4933fc0840Smbalmerecho ".\\\"" >>/tmp/lua2m$$ 5033fc0840Smbalmer cat $m >> /tmp/lua2m$$ 5133fc0840Smbalmer mv /tmp/lua2m$$ $m && echo added RCS tag to $m 5233fc0840Smbalmer ) 5333fc0840Smbalmerdone 5433fc0840Smbalmer 5533fc0840Smbalmerecho done 5633fc0840Smbalmerexit 0 57