[BACK]Return to symlink-tree CVS log [TXT][DIR] Up to [local] / src / gnu / egcs

File: [local] / src / gnu / egcs / Attic / symlink-tree (download)

Revision 1.1.1.1 (vendor branch), Wed May 26 13:33:48 1999 UTC (25 years ago) by espie
Branch: CYGNUS
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1, OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, GCC-2_95_pre3_test3, GCC-2_95_pre3_test2, GCC-2_95_pre3_20000527, GCC-2_95_2, GCC-2_95_1, CYGNUS-990718, CYGNUS-990629, CYGNUS-990608, CYGNUS-19990517
Changes since 1.1: +0 -0 lines

egcs projects compiler system
Exact copy of the snapshot, except for the removal of
	texinfo/
	gcc/ch/
	libchill/


#!/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"

ignore_additional=". .. CVS"

# If we were invoked with a relative path name, adjust ${prog} to work
# in subdirs.
case ${prog} in
/*) ;;
*) prog=../${prog} ;;
esac

# Set newsrcdir to something subdirectories can use.
case ${srcdir} in
/*) 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