| 1 | #!/bin/sh
|
|---|
| 2 | # Create a symlink tree.
|
|---|
| 3 | #
|
|---|
| 4 | # Syntax: symlink-tree srcdir "ignore1 ignore2 ..."
|
|---|
| 5 | #
|
|---|
| 6 | # where srcdir is the directory to create a symlink tree to,
|
|---|
| 7 | # and "ignoreN" is a list of files/directories to ignore.
|
|---|
| 8 |
|
|---|
| 9 | prog=$0
|
|---|
| 10 | srcdir=$1
|
|---|
| 11 | ignore="$2"
|
|---|
| 12 |
|
|---|
| 13 | if test $# -lt 1; then
|
|---|
| 14 | echo "symlink-tree error: Usage: symlink-tree srcdir \"ignore1 ignore2 ...\""
|
|---|
| 15 | exit 1
|
|---|
| 16 | fi
|
|---|
| 17 |
|
|---|
| 18 | ignore_additional=". .. CVS"
|
|---|
| 19 |
|
|---|
| 20 | # If we were invoked with a relative path name, adjust ${prog} to work
|
|---|
| 21 | # in subdirs.
|
|---|
| 22 | case ${prog} in
|
|---|
| 23 | /* | [A-Za-z]:[\\/]*) ;;
|
|---|
| 24 | *) prog=../${prog} ;;
|
|---|
| 25 | esac
|
|---|
| 26 |
|
|---|
| 27 | # Set newsrcdir to something subdirectories can use.
|
|---|
| 28 | case ${srcdir} in
|
|---|
| 29 | /* | [A-Za-z]:[\\/]*) newsrcdir=${srcdir} ;;
|
|---|
|
|---|