Mail Archives: djgpp-workers/1999/05/25/17:53:45
In your letter dated Tue, 25 May 1999 11:21:56 -0400, you wrote:
> I would also add I appreciate the efforts.
> > versions as automated as reasonably possible, then I'm all for it.
> I should be more specific. I would like a script that I can include in the
> source that would:
> 1) Rename the files that clash in an SFN environment.
> 2) Change references of '.patchlevel' and '.distrubution' to '_patchlevel'
> and '_distribution' in a set of files (with a sed script?).
Is the attached file what you had in mind?
I tested the script with both bash203 and bash1147, and it worked fine
for me. It changes LFN clashes for the examples,
termcap/grot/termcap.info*, and fixes config.h.in/config.h-in.
It does NOT fix the y.tab/y_tab issue. And to be frank with you all, I
dont think I will be able to fix that in the near future (a lack of
time...). Martin, maybe you can do that part? You were very close to
the solution already, and I think Eli's suggestion should be incorperated.
hth,
Robert
--- cut here for lfn2sfn-change.sh ---
#! bash
### A little exercise in bash...
export SCRTMPFIL=_ttmmpp.rj
function _rjmv2() {
if [ $# -ne 2 ] ; then
echo "usage: _rjmv2 OldName NewName" 1>&2
return 1
fi
if [ -f $1 ] ; then
if [ "$1" = "$2" ] ; then
echo "_rjmv2: \`$1' and \`$2' are the same." 1>&2
return 1
else
echo _rjmv2: mv $1 $2
mv $1 $2
fi
else
echo "_rjmv2: \`$1' does not exist! Did you execute me already?" 1>&2
return 1
fi
}
echo Renaming some files that would clash with other files when taken in the
echo 8.3 convention, or have to many dots. \(Disallowed on sfn-DOS\)
_rjmv2 ./examples/scripts.noah/bash.sub.bash ./examples/scripts.noah/bash_sub.bash
_rjmv2 ./examples/functions/basename2 ./examples/functions/basenam2
_rjmv2 ./tests/run-array2 ./tests/run-arr2
_rjmv2 ./tests/run-histexpand ./tests/run-hisxpand
_rjmv2 ./tests/run-posixpat ./tests/run-psxpat
_rjmv2 ./examples/scripts/scrollbar2 ./examples/scripts/scrollb2
echo Changing references to bash.sub.bash in all files...
for f in \
examples/scripts.noah/bash_sub.bash \
examples/scripts.noah/readme \
manifest
do
sed -e 's/bash.sub/bash_sub/g' $f > ${SCRTMPFIL} && \
update ${SCRTMPFIL} $f && rm ${SCRTMPFIL}
done
echo Now changing these file references in manifest...
sed -e 's/basename2/basenam2/g' \
-e 's/run-array2/run-arr2/g' \
-e 's/run-histexpand/run-hisxpand/g' \
-e 's/run-posixpat/run-psxpat/g' \
-e 's/scrollbar2/scrollb2/g' ./manifest > ${SCRTMPFIL} && \
update ${SCRTMPFIL} ./manifest && \
rm ${SCRTMPFIL}
echo Now patching tests/run-minimal...
sed -e 's/run-posixpat/run-psxpat/g' ./tests/run-minimal > ${SCRTMPFIL} && \
update ${SCRTMPFIL} ./tests/run-minimal && \
rm ${SCRTMPFIL}
if [ -f ./lib/termcap/grot/termcap.info-1 ] ; then
echo "Need to remake ./lib/termcap/grot/termcap.info with --no-split, because the following files all resolve"
echo "to termcap.inf on sfn-DOS:"
echo "./lib/termcap/grot/termcap.info"
echo "./lib/termcap/grot/termcap.info-[1234]"
cd ./lib/termcap/grot
rm termcap.info* && makeinfo --no-split termcap.texi
echo Patch makefile.in to include --no-split at makeinfo invocation...
sed -e 's/\$(MAKEINFO) \$(srcdir)/$(MAKEINFO) --no-split $(srcdir)/g' makefile.in > ${SCRTMPFIL} && \
update ${SCRTMPFIL} makefile.in && \
rm ${SCRTMPFIL}
cd -
fi
if [ -f config.h.in ] ; then
echo I will mv config.h.in to config.h-in
mv config.h.in config.h-in
fi
echo Change references of config.h.in to config.h-in...
for f in \
AUTHORS \
config.h-in \
configure.in \
configure \
Makefile.in \
Makefile \
MANIFEST \
tests/errors.tests \
support/missing
do
sed -e 's/config\.h\.in/config.h-in/g' $f > ${SCRTMPFIL} &&
update ${SCRTMPFIL} $f && \
rm ${SCRTMPFIL}
done
echo Last but not least, the list of files that still have a reference to y.tab:
grep -l y\.tab `find . -type f -not -name "*~"`
- Raw text -