[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: package naming for working directories, tarfiles and diff files



Bill Mitchell:
   Comments?

I dunno, looks like a tradeoff to me.

One thing though, if you're going to be throwing around duplicate
directory structures a lot, it's handy to have a utility to do the
duplication.  The one below doesn't exactly do the right thing for
symbolic links, unfortunately.

Raul D. Miller
<rockwell@nova.umd.edu>

------------------------------ dup ------------------------------
#!/bin/sh
if [ $# != 2 ]
then
	echo Usage: $0 sourcedir destdir
	exit 1
fi
mkdir -p $2

(
	cd $1
	find . -type d ! -inum `ls -id .|cut -f1 -d' '` -print 
) | (
	cd $2
	xargs mkdir -p
)

for x in `(cd $1; find . -type f -print -o -type l -print)`
do
	ln $1/$x $2/$x
done


Reply to: