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 ignore_additional
=". .. CVS"
15 # If we were invoked with a relative path name, adjust ${prog} to work
22 # Set newsrcdir to something subdirectories can use.
24 /*) newsrcdir
=${srcdir} ;;
25 *) newsrcdir
=..
/${srcdir} ;;
28 for f
in `ls -a ${srcdir}`; do
29 if [ -d ${srcdir}/$f ]; then
31 for i
in ${ignore} ${ignore_additional}; do
32 if [ "$f" = "$i" ]; then
36 if [ -z "${found}" ]; then
37 echo "$f ..working in"
38 if [ -d $f ]; then true
; else mkdir
$f; fi
39 (cd $f; ${prog} ${newsrcdir}/$f "${ignore}")