programming: Makefile

George Georgalis george at galis.org
Fri May 27 12:30:40 PDT 2005


On Fri, May 27, 2005 at 03:15:58PM -0400, George Georgalis wrote:
>MAKE_REAL_HARD_LINKS :
>	# Replicate cvs checked out directory into real location,
>	# as directories and hardlinks.
>	test -f CVS/Repository # for sanity
>	mkdir -p ${REAL}
>	test -d ${REAL}
>	test -w ${REAL}
>	# Create directories as required
>	for dir in `find . -mindepth 1 ! \( -path '*/CVS' -prune \) -type d -printf "%P\n"`; do \
>		[ -a "${REAL}/$${dir}" -a ! -d "${REAL}/$${dir}" ] || exit 1; \
>		mkdir -p ${REAL}/$${dir}; \
>	done
>	# Make hardlinks for files, but not cvs saved backups or Makefiles
>	for file in `find . ! \( -path '*/CVS' -prune \) -type f ! -name .$#\* ! -name Makefile -printf "%P\n"`; do \
>		ln -f $${file} ${REAL}/$${file}; \
>	done


Heh, s/-printf "%P\n"//

// George


-- 
George Georgalis, systems architect, administrator Linux BSD IXOYE
http://galis.org/george/ cell:646-331-2027 mailto:george at xxxxxxxxx





More information about the Users mailing list