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

Re: finishing up the /usr/share/doc transition



On Mon, Jan 01, 2001 at 03:05:14PM -0800, Joey Hess wrote:
> 
> # Move any remaining directories and symlinks from OLDDOC to NEWDOC.
> for item in `find $OLDDOC -maxdepth 1 \( -type d -or -type l \) -printf '%P\n'`; do
> 	if [ "$item" -a -e "$NEWDOC/$item" ]; then
> 		echo "$item exists in $NEWDOC too; should never happen" >&2
> 		exit 1
> 	fi
> 	mv -f $OLDDOC/$item $NEWDOC
> done
> 

Maybe this should be something like:

	if cp -a $OLDDOC/$item $NEWDOC; then
		rm -rf $OLDDOC/$item
	else
		rm -rf $NEWDOC/$item
		exit 1
	fi

That should handle filesystem full errors a bit better.

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'



Reply to: