| # 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. |
| echo "symlink-tree error: Usage: symlink-tree srcdir \"ignore1 ignore2 ...\"" |
| ignore_additional=". .. CVS" |
| # If we were invoked with a relative path name, adjust ${prog} to work |
| # Set newsrcdir to something subdirectories can use. |
| /* | [A-Za-z]:[\\/]*) newsrcdir=${srcdir} ;; |
| *) newsrcdir=../${srcdir} ;; |
| for f in `ls -a ${srcdir}`; do |
| if [ -d ${srcdir}/$f ]; then |
| for i in ${ignore} ${ignore_additional}; do |
| if [ -z "${found}" ]; then |
| if [ -d $f ]; then true; else mkdir $f; fi |
| (cd $f; ${prog} ${newsrcdir}/$f "${ignore}") |