User Notes presentation
randy at linuxfromscratch.org
Sun Apr 9 13:33:19 PDT 2006
M.Canales.es wrote these words on 04/09/06 14:57 CST:
> Not, sorry, not noticed that extra "usernotes" until now.
Okay, then. I'll run the following commands to update almost every
file in the repo. I realize there is redundancy, extra code and
wasted cycles, along with poor scripting below. But it took just
a minute or two and it works. You'll see how I tested, and just
have to change the commented line.
The only thing I did differently is that I didn't use all that
uppercasing in the filename. I didn't think it was necessary or
truly desireable for URL's to be all weird-cased. If it is
determined that the UpperLower type casing is required, it is
just one more grep,awk,cut line to get the UpperLower name.
I'll wait an hour or two to see if anyone sees a glaring mistake.
If I don't hear anything, or someone confirms it looks good, I'll
let it rip and commit.
find /home/randy/BLFS/BOOK -name "*.xml" >/home/randy/specialadd1.list
echo "Found $(cat /home/randy/specialadd1.list | wc -l) .xml files"
for FILENAME in $(cat /home/randy/specialadd1.list); do
grep -l '<keyword role="package">' $FILENAME >>/home/randy/specialadd2.list
echo "Found $(cat /home/randy/specialadd2.list | wc -l) package .xml files"
for FILENAME in $(cat /home/randy/specialadd2.list); do
grep -lL 'User Notes:' $FILENAME >>/home/randy/specialadd3.list
echo "Found $(cat /home/randy/specialadd3.list | wc -l) package .xml files to modify"
#for FILENAME in $(cat /home/randy/specialadd3.list); do
for FILENAME in /home/randy/BLFS/BOOK/x/lib/goffice.xml; do
sed -i "1,/<\/sect2>/ s|.*</sect2>| <para condition=\"html\" role=\"usernotes\">User Notes:\\
<ulink url=\"\&blfs-wiki;/`basename $FILENAME .xml`\"/></para>\\
rmlscsi: [bogomips 1003.28] [GNU ld version 2.16.1] [gcc (GCC) 4.0.3]
[GNU C Library stable release version 2.3.6] [Linux 188.8.131.52 i686]
15:25:00 up 15 days, 3:02, 1 user, load average: 0.00, 0.00, 0.01
More information about the blfs-dev