Fix grepping for VERSION (func_install_blfs)

Add LFS-Release (update-lfs.sh and func_install_blfs)
This commit is contained in:
Pierre Labastie 2017-08-17 11:27:07 +00:00
parent ce244f6517
commit e3f4b9a4c1
2 changed files with 33 additions and 10 deletions

View file

@ -95,25 +95,38 @@ echo You answered $ANSWER
#End debug
if [ x$ANSWER = "xyes" ] ; then
for pack in $(grep '<productname' $LFS_FULL |
sed 's/.*>\([^<]*\)<.*/\1/' |
sort | uniq); do
if [ "$pack" = "libstdc++" ]; then continue; fi
VERSION=$(grep -A1 ">$pack</product" $LFS_FULL |
head -n2 |
sed -n '2s/.*>\([^<]*\)<.*/\1/p')
for pack in $(grep '<productname' $LFS_FULL |
sed 's/.*>\([^<]*\)<.*/\1/' |
sort | uniq); do
if [ "$pack" = "libstdc++" ]; then continue; fi
VERSION=$(grep -A1 ">$pack</product" $LFS_FULL |
head -n2 |
sed -n '2s/.*>\([^<]*\)<.*/\1/p')
#Debug
echo $pack: $VERSION
#End debug
xsltproc --stringparam packages $MYDIR/packages.xml \
--stringparam package $pack \
--stringparam version $VERSION \
-o track.tmp \
$MYDIR/xsl/bump.xsl ${TRACKFILE}
sed -i "s@PACKDESC@$MYDIR/packdesc.dtd@" track.tmp
xmllint --format --postvalid track.tmp > ${TRACKFILE}
rm track.tmp
done
VERSION=$(grep 'echo.*lfs-release' $LFS_FULL |
sed 's/.*echo[ ]*\([^ ]*\).*/\1/')
#Debug
echo LFS-Release: $VERSION
#End debug
xsltproc --stringparam packages $MYDIR/packages.xml \
--stringparam package $pack \
--stringparam package LFS-Release \
--stringparam version $VERSION \
-o track.tmp \
$MYDIR/xsl/bump.xsl ${TRACKFILE}
sed -i "s@PACKDESC@$MYDIR/packdesc.dtd@" track.tmp
xmllint --format --postvalid track.tmp > ${TRACKFILE}
rm track.tmp
done
fi
#Debug
#echo After BEG_COMMAND\; before END_COMMAND

View file

@ -219,7 +219,7 @@ update:
@for pack in \$\$(grep '<productname' ../$LFS_XML/tmp/lfs-full.xml | \\
sed 's/.*>\([^<]*\)<.*/\1/' | \\
sort | uniq); do \\
VERSION=\$\$(grep -A1 "\$\$pack</product" \\
VERSION=\$\$(grep -A1 ">\$\$pack</product" \\
../$LFS_XML/tmp/lfs-full.xml | \\
head -n2| \\
sed -n '2s/.*>\([^<]*\)<.*/\1/p'); \\
@ -232,6 +232,16 @@ update:
xmllint --format --postvalid track.tmp > \$(TRACKING_FILE); \\
rm track.tmp; \\
done; \\
VERSION=\$\$(grep 'echo.*lfs-release' ../$LFS_XML/tmp/lfs-full.xml | \\
sed 's/.*echo[ ]*\([^ ]*\).*/\1/'); \\
xsltproc --stringparam packages ../packages.xml \\
--stringparam package LFS-Release \\
--stringparam version \$\$VERSION \\
-o track.tmp \\
../xsl/bump.xsl \$(TRACKING_FILE); \\
sed -i 's@PACKDESC@$BLFS_ROOT/packdesc.dtd@' track.tmp; \\
xmllint --format --postvalid track.tmp > \$(TRACKING_FILE); \\
rm track.tmp; \\
for file in *-*; do \\
xsltproc --stringparam packages ../packages.xml \\
--stringparam package \$\${file##*z-} \\