Code Search for Developers
 
 
  

copyFiles.sh.in from GreenSocs at Krugle


Show copyFiles.sh.in syntax highlighted


# copyFiles.sh [-s] <srcdir> <dstdir> <file> ..

# Avoid syntax errors associated with empty for loops in Makefiles.

if test "$1" = "-s"; then
  cmd="ln -s"
  shift
else
  cmd="cp"
fi

srcdir=$1
dstdir=$2
shift 2

srcdir=`cd $srcdir;pwd`
mkdir -p $dstdir
dstdir=`cd $dstdir;pwd`

if test "$srcdir" != "$dstdir"; then 

  cd $dstdir

  if test "$overwrite" = "yes"; then

    while test $# != 0; do
      file=$1
      rm -f $file
      $cmd $srcdir/$file .
      shift
    done

  else

    while test $# != 0; do
      file=$1
      if test ! -r $file; then
        $cmd $srcdir/$file .
      fi
      shift
    done

  fi

fi




See more files for this project here

GreenSocs

To develop SystemC infrustructure, basic IP, patches and add on library code for eventual standerdization.\r\nThe GreenSocs project is made up of a number of contributions (sub projects). Please visit www.greensocs.com for more information.

Project homepage: http://sourceforge.net/projects/greensocs
Programming language(s): C,C++,Java,Perl,XML
License: other

  Makefile.am
  copyDir.sh.in
  copyExamples.sh
  copyFiles.sh.in