Update of /cvsroot/fink/experimental/fangism/scripts
In directory vz-cvs-3.sog:/tmp/cvs-serv21599

Added Files:
        link-identical-files.sh 
Log Message:
handy script for linking files that are identical between trees
and reporting which ones differ or are new from reference dir
helps maintain 10.4-EOL


--- NEW FILE: link-identical-files.sh ---
#!/bin/sh -e
# "link-identical-files.sh"
# usage:
# $0 srcdir

test $# = 1 || exit 1
srcdir=$1
for f in $srcdir/*
do
# if file exists in . (destdir)
dest=`basename $f`
if test -f $dest
then
# destdir is not already linked
if test ! -L $dest
then
if diff -q $f $dest
then
# and both files are identical
# create link
        echo "SAME: $dest -- linking"
        ln -s -f $f .
else
# report differences
        echo "DIFF: $dest"
fi
else
        # already linked
#       echo "link: $dest"
        :
fi
else
        # only exists in srcdir
        echo "NEW:  $dest"
fi
done



------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to