script to move most of include/*.h to include/inn/*.h

Adam J. Richter adam at
Sun Nov 19 12:29:47 UTC 2006

	The following shell script, if executed in the top level of
the inn-CURRENT-20061118 source tree, moves all but one of the header
files currently in include/ to include/nntp/, and updates references to
these files.  The exception is include/nntp.h, since there is already
a different include/nntp/nntp.h.

	In the case of inn-CURRENT-20061118, I have verified that
if I build a source tree modified by this script and a pristine
source tree, and then strip all of the .o files in both trees, that
all of the .o files are unchanged.  I've also checked that
"./configure --prefix=/usr && make all && make install" still succeeds
after running this script.

	I suggest running it on the inn-CURRENT tree after applying
my patch to move include/paths.h.  (You could also just skip my
patch to move include/paths.h, as this will pick it up, but you
should still apply the minor manual update to inn/TODO that it

	I imagine you could do the same thing to inn-CURRENT, but
I guess that is more of a policy question, as I am not sure that
there are any other conflicts currently caused by inn installing
files directly in /usr/include/, although it would not surprise
me to find something else also clobbering /usr/include/config.h.
Then again, since this change apparently compiles to the same
binaries, maybe that is good enough to get into inn-STABLE just
to minimize differences between STABLE and CURRENT.

Adam Richter

for file_path in include/*{.h,} ; do
	if [ "$file" = nntp.h ] ; then
	mv -i include/$file include/inn/$file
	pattern=$(echo $file | sed 's/\./\\./g')
	for target in $(find . -type f | xargs grep -l $file) ; do
		ed $target << DONE

More information about the inn-workers mailing list