17ac82dd3Schristos#! /bin/sh 27ac82dd3Schristos# 3*f72a8c67Schristos# $NetBSD: gdb2netbsd,v 1.3 2020/09/15 02:05:15 christos Exp $ 47ac82dd3Schristos# 57ac82dd3Schristos# Copyright (c) 2011 The NetBSD Foundation, Inc. 67ac82dd3Schristos# All rights reserved. 77ac82dd3Schristos# 87ac82dd3Schristos# Redistribution and use in source and binary forms, with or without 97ac82dd3Schristos# modification, are permitted provided that the following conditions 107ac82dd3Schristos# are met: 117ac82dd3Schristos# 1. Redistributions of source code must retain the above copyright 127ac82dd3Schristos# notice, this list of conditions and the following disclaimer. 137ac82dd3Schristos# 2. Redistributions in binary form must reproduce the above copyright 147ac82dd3Schristos# notice, this list of conditions and the following disclaimer in the 157ac82dd3Schristos# documentation and/or other materials provided with the distribution. 167ac82dd3Schristos# 177ac82dd3Schristos# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 187ac82dd3Schristos# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 197ac82dd3Schristos# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 207ac82dd3Schristos# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 217ac82dd3Schristos# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 227ac82dd3Schristos# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 237ac82dd3Schristos# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 247ac82dd3Schristos# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 257ac82dd3Schristos# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 267ac82dd3Schristos# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 277ac82dd3Schristos# POSSIBILITY OF SUCH DAMAGE. 287ac82dd3Schristos# 297ac82dd3Schristos# gdb2netbsd: convert a file source tree into a 307ac82dd3Schristos# format suitable for import. Works on current dir. 317ac82dd3Schristos# You can run this only once if you want it to work. 327ac82dd3Schristos# 337ac82dd3Schristos# based on file 2netbsd 347ac82dd3Schristos# 357ac82dd3SchristosPROG="$(basename "$0")" 367ac82dd3Schristos 377ac82dd3Schristosif [ -z "$1" ] 387ac82dd3Schristosthen 397ac82dd3Schristos echo "Usage: $PROG <directory>" 1>&2 407ac82dd3Schristos exit 1 417ac82dd3Schristosfi 427ac82dd3SchristosFILE="$1" 437ac82dd3Schristos 447ac82dd3Schristos### Remove the $'s around RCS tags 45034641abSchristoscleantags "$FILE" 46*f72a8c67Schristosfind "$1" -name .git\* -exec rm -fr {} + 477ac82dd3Schristos 487ac82dd3Schristosecho You can import now. Use the following command: 497ac82dd3Schristosecho cvs import src/external/gpl3/gdb/dist FSF gdb-X-Y-Z 507ac82dd3Schristos 517ac82dd3Schristosexit 0 52