xref: /netbsd-src/external/gpl3/binutils/binutils2netbsd (revision c232f289ed172ffcad43649d76fba38dbb6e7c3e)
1be8325a0Schristos#! /bin/sh
2be8325a0Schristos#
3*c232f289Srillig#	$NetBSD: binutils2netbsd,v 1.3 2024/09/08 10:01:59 rillig Exp $
4be8325a0Schristos#
5be8325a0Schristos# Copyright (c) 2016 The NetBSD Foundation, Inc.
6be8325a0Schristos# All rights reserved.
7be8325a0Schristos#
8be8325a0Schristos# Redistribution and use in source and binary forms, with or without
9be8325a0Schristos# modification, are permitted provided that the following conditions
10be8325a0Schristos# are met:
11be8325a0Schristos# 1. Redistributions of source code must retain the above copyright
12be8325a0Schristos#    notice, this list of conditions and the following disclaimer.
13be8325a0Schristos# 2. Redistributions in binary form must reproduce the above copyright
14be8325a0Schristos#    notice, this list of conditions and the following disclaimer in the
15be8325a0Schristos#    documentation and/or other materials provided with the distribution.
16be8325a0Schristos#
17be8325a0Schristos# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
18be8325a0Schristos# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19be8325a0Schristos# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20be8325a0Schristos# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
21be8325a0Schristos# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22be8325a0Schristos# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23be8325a0Schristos# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24be8325a0Schristos# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25be8325a0Schristos# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26be8325a0Schristos# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27be8325a0Schristos# POSSIBILITY OF SUCH DAMAGE.
28be8325a0Schristos#
29*c232f289Srillig# binutils2netbsd:  convert a binutils source tree into a
30be8325a0Schristos# format suitable for import.  Works on first arg dir.
31be8325a0Schristos# You can run this only once if you want it to work.
32be8325a0Schristos#
33be8325a0Schristos# based on file 2netbsd
34be8325a0Schristos#
35be8325a0SchristosPROG="$(basename "$0")"
36be8325a0Schristos
37be8325a0Schristosif [ -z "$1" ]
38be8325a0Schristosthen
39be8325a0Schristos	echo "Usage: $PROG <directory>" 1>&2
40be8325a0Schristos	exit 1
41be8325a0Schristosfi
42be8325a0SchristosDIR="$1"
43be8325a0Schristos
44be8325a0Schristos### Remove the $'s around RCS tags
45be8325a0Schristoscleantags "$DIR"
46be8325a0Schristos
47be8325a0Schristosfind "$DIR" -name testsuite -exec rm -fr {} +
48f41bcc9bSchristosfind "$DIR" -name .gitignore -rm
49be8325a0Schristos
50be8325a0Schristosecho You can import now.  Use the following command:
51be8325a0Schristosecho cvs import src/external/gpl3/binutils/dist FSF binutils-X-YY-Z
52be8325a0Schristos
53be8325a0Schristosexit 0
54