mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-03-02 13:05:42 +08:00

2_12-branch'. Sprout from gdb_5_1-2001-07-29-branch 2001-07-26 14:20:06 UTC cvs2svn 'This commit was manufactured by cvs2svn to create branch' Cherrypick from master 2002-02-09 22:54:16 UTC Richard Henderson <rth@redhat.com> ' * alpha.h (R_ALPHA_BRSGP): New.': COPYING.NEWLIB ChangeLog MAINTAINERS Makefile.in config.guess config.sub configure configure.in etc/ChangeLog etc/Makefile.in gettext.m4 include/ChangeLog include/ansidecl.h include/aout/ChangeLog include/aout/aout64.h include/aout/hp300hpux.h include/bfdlink.h include/coff/ChangeLog include/coff/arm.h include/coff/external.h include/coff/internal.h include/coff/m88k.h include/coff/or32.h include/coff/ti.h include/coff/tic54x.h include/coff/xcoff.h include/demangle.h include/dis-asm.h include/dyn-string.h include/elf/ChangeLog include/elf/alpha.h include/elf/arm.h include/elf/common.h include/elf/dwarf2.h include/elf/external.h include/elf/h8.h include/elf/ia64.h include/elf/internal.h include/elf/mips.h include/elf/mmix.h include/elf/or32.h include/elf/ppc.h include/elf/sh.h include/elf/xstormy16.h include/fibheap.h include/filenames.h include/floatformat.h include/hashtab.h include/libiberty.h include/nlm/ChangeLog include/nlm/common.h include/objalloc.h include/opcode/ChangeLog include/opcode/alpha.h include/opcode/arc.h include/opcode/avr.h include/opcode/cgen.h include/opcode/d10v.h include/opcode/d30v.h include/opcode/h8300.h include/opcode/hppa.h include/opcode/i386.h include/opcode/mips.h include/opcode/mmix.h include/opcode/or32.h include/opcode/ppc.h include/opcode/tic54x.h include/opcode/v850.h include/partition.h include/safe-ctype.h include/sort.h include/splay-tree.h include/xregex.h libtool.m4 ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh ltconfig ltmain.sh symlink-tree
54 lines
1.1 KiB
Bash
Executable File
54 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# Create a symlink tree.
|
|
#
|
|
# Syntax: symlink-tree srcdir "ignore1 ignore2 ..."
|
|
#
|
|
# where srcdir is the directory to create a symlink tree to,
|
|
# and "ignoreN" is a list of files/directories to ignore.
|
|
|
|
prog=$0
|
|
srcdir=$1
|
|
ignore="$2"
|
|
|
|
if test $# -lt 1; then
|
|
echo "symlink-tree error: Usage: symlink-tree srcdir \"ignore1 ignore2 ...\""
|
|
exit 1
|
|
fi
|
|
|
|
ignore_additional=". .. CVS"
|
|
|
|
# If we were invoked with a relative path name, adjust ${prog} to work
|
|
# in subdirs.
|
|
case ${prog} in
|
|
/* | [A-Za-z]:[\\/]*) ;;
|
|
*) prog=../${prog} ;;
|
|
esac
|
|
|
|
# Set newsrcdir to something subdirectories can use.
|
|
case ${srcdir} in
|
|
/* | [A-Za-z]:[\\/]*) newsrcdir=${srcdir} ;;
|
|
*) newsrcdir=../${srcdir} ;;
|
|
esac
|
|
|
|
for f in `ls -a ${srcdir}`; do
|
|
if [ -d ${srcdir}/$f ]; then
|
|
found=
|
|
for i in ${ignore} ${ignore_additional}; do
|
|
if [ "$f" = "$i" ]; then
|
|
found=yes
|
|
fi
|
|
done
|
|
if [ -z "${found}" ]; then
|
|
echo "$f ..working in"
|
|
if [ -d $f ]; then true; else mkdir $f; fi
|
|
(cd $f; ${prog} ${newsrcdir}/$f "${ignore}")
|
|
fi
|
|
else
|
|
echo "$f ..linked"
|
|
rm -f $f
|
|
ln -s ${srcdir}/$f .
|
|
fi
|
|
done
|
|
|
|
exit 0
|