2 # Create a symlink tree.
4 # Syntax: symlink-tree srcdir "ignore1 ignore2 ..."
6 # where srcdir is the directory to create a symlink tree to,
7 # and "ignoreN" is a list of files/directories to ignore.
13 if test $# -lt 1; then
14 echo "symlink-tree error: Usage: symlink-tree srcdir \"ignore1 ignore2 ...\""
18 ignore_additional=". .. CVS"
20 # If we were invoked with a relative path name, adjust ${prog} to work
27 # Set newsrcdir to something subdirectories can use.
29 /*) newsrcdir=${srcdir} ;;
30 *) newsrcdir=../${srcdir} ;;
33 for f in `ls -a ${srcdir}`; do
34 if [ -d ${srcdir}/$f ]; then
36 for i in ${ignore} ${ignore_additional}; do
37 if [ "$f" = "$i" ]; then
41 if [ -z "${found}" ]; then
42 echo "$f ..working in"
43 if [ -d $f ]; then true; else mkdir $f; fi
44 (cd $f; ${prog} ${newsrcdir}/$f "${ignore}")