1#!/bin/sh 2 3if [ $# -gt 0 ] 4then 5 srcdir=$1 6else 7 srcdir=. 8fi 9 10common_files=`ls ${srcdir}/common` 11#echo "common files = " ${common_files} 12 13 14for d in * 15do 16 if test -d "$d" && ! test "$d" = common 17 then 18 for i in ${common_files} 19 do 20 case $i in 21 *~) 22 ;; 23 *) 24 ( cd $d; rm -f $i; ln -s ../${srcdir}/common/$i $i ) 25 ;; 26 esac 27 done 28 fi 29done 30