29 lines
461 B
Plaintext
29 lines
461 B
Plaintext
case $# in
|
|
2|3) ;;
|
|
*) echo Usage: $0 directory repdir [ SVrecord ] 1>&2 ; exit 1 ;;
|
|
esac
|
|
case $0 in
|
|
/*) DDIR=`dirname $0`
|
|
;;
|
|
*) DDIR=`pwd`/`dirname $0`
|
|
;;
|
|
esac
|
|
case $1 in
|
|
/*) DESTDIR=$1 ;;
|
|
*) DESTDIR=`pwd`/$1 ;;
|
|
esac
|
|
case $2 in
|
|
/*) REPDIR=$2 ;;
|
|
*) REPDIR=`pwd`/$2 ;;
|
|
esac
|
|
cd $REPDIR
|
|
DD=$DDIR/mkd
|
|
DF=$DDIR/mkf
|
|
DA=$DDIR/mka
|
|
export DDIR DESTDIR DD DF DA REPDIR
|
|
$DDIR/dwalk $3
|
|
|
|
cd $DESTDIR
|
|
find . -type d -print | xargs chmod "uog+rx"
|
|
chmod -R "og-w,u+w,uog+r" .
|