2 # Create a symlink tree.
4 # Copyright (C) 1995, 2000, 2003 Free Software Foundation, Inc.
6 # This file is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 # Boston, MA 02110-1301, USA.
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
26 # Please report bugs to <gcc-bugs@gnu.org>
27 # and send patches to <gcc-patches@gnu.org>.
29 # Syntax: symlink-tree srcdir "ignore1 ignore2 ..."
31 # where srcdir is the directory to create a symlink tree to,
32 # and "ignoreN" is a list of files/directories to ignore.
38 if test $# -lt 1; then
39 echo "symlink-tree error: Usage: symlink-tree srcdir \"ignore1 ignore2 ...\""
43 ignore_additional
=". .. CVS"
45 # If we were invoked with a relative path name, adjust ${prog} to work
48 /* |
[A-Za-z
]:[\\/]*) ;;
52 # Set newsrcdir to something subdirectories can use.
54 /* |
[A-Za-z
]:[\\/]*) newsrcdir
=${srcdir} ;;
55 *) newsrcdir
=..
/${srcdir} ;;
58 for f
in `ls -a ${srcdir}`; do
59 if [ -d ${srcdir}/$f ]; then
61 for i
in ${ignore} ${ignore_additional}; do
62 if [ "$f" = "$i" ]; then
66 if [ -z "${found}" ]; then
67 echo "$f ..working in"
68 if [ -d $f ]; then true
; else mkdir
$f; fi
69 (cd $f; ${prog} ${newsrcdir}/$f "${ignore}")
This page took 0.03331 seconds and 4 git commands to generate.