URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [branches/] [newlib/] [newlib/] [symlink-tree] - Rev 1765
Compare with Previous | Blame | View Log
#!/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=$0srcdir=$1ignore="$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} ;;esacfor f in `ls -a ${srcdir}`; doif [ -d ${srcdir}/$f ]; thenfound=for i in ${ignore} ${ignore_additional}; doif [ "$f" = "$i" ]; thenfound=yesfidoneif [ -z "${found}" ]; thenecho "$f ..working in"if [ -d $f ]; then true; else mkdir $f; fi(cd $f; ${prog} ${newsrcdir}/$f "${ignore}")fielseecho "$f ..linked"rm -f $fln -s ${srcdir}/$f .fidoneexit 0
