Fix grepping for VERSION (func_install_blfs)
Add LFS-Release (update-lfs.sh and func_install_blfs)
This commit is contained in:
parent
ce244f6517
commit
e3f4b9a4c1
2 changed files with 33 additions and 10 deletions
|
@ -95,25 +95,38 @@ echo You answered $ANSWER
|
||||||
#End debug
|
#End debug
|
||||||
|
|
||||||
if [ x$ANSWER = "xyes" ] ; then
|
if [ x$ANSWER = "xyes" ] ; then
|
||||||
for pack in $(grep '<productname' $LFS_FULL |
|
for pack in $(grep '<productname' $LFS_FULL |
|
||||||
sed 's/.*>\([^<]*\)<.*/\1/' |
|
sed 's/.*>\([^<]*\)<.*/\1/' |
|
||||||
sort | uniq); do
|
sort | uniq); do
|
||||||
if [ "$pack" = "libstdc++" ]; then continue; fi
|
if [ "$pack" = "libstdc++" ]; then continue; fi
|
||||||
VERSION=$(grep -A1 ">$pack</product" $LFS_FULL |
|
VERSION=$(grep -A1 ">$pack</product" $LFS_FULL |
|
||||||
head -n2 |
|
head -n2 |
|
||||||
sed -n '2s/.*>\([^<]*\)<.*/\1/p')
|
sed -n '2s/.*>\([^<]*\)<.*/\1/p')
|
||||||
#Debug
|
#Debug
|
||||||
echo $pack: $VERSION
|
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
|
#End debug
|
||||||
xsltproc --stringparam packages $MYDIR/packages.xml \
|
xsltproc --stringparam packages $MYDIR/packages.xml \
|
||||||
--stringparam package $pack \
|
--stringparam package LFS-Release \
|
||||||
--stringparam version $VERSION \
|
--stringparam version $VERSION \
|
||||||
-o track.tmp \
|
-o track.tmp \
|
||||||
$MYDIR/xsl/bump.xsl ${TRACKFILE}
|
$MYDIR/xsl/bump.xsl ${TRACKFILE}
|
||||||
sed -i "s@PACKDESC@$MYDIR/packdesc.dtd@" track.tmp
|
sed -i "s@PACKDESC@$MYDIR/packdesc.dtd@" track.tmp
|
||||||
xmllint --format --postvalid track.tmp > ${TRACKFILE}
|
xmllint --format --postvalid track.tmp > ${TRACKFILE}
|
||||||
rm track.tmp
|
rm track.tmp
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
#Debug
|
#Debug
|
||||||
#echo After BEG_COMMAND\; before END_COMMAND
|
#echo After BEG_COMMAND\; before END_COMMAND
|
||||||
|
|
|
@ -219,7 +219,7 @@ update:
|
||||||
@for pack in \$\$(grep '<productname' ../$LFS_XML/tmp/lfs-full.xml | \\
|
@for pack in \$\$(grep '<productname' ../$LFS_XML/tmp/lfs-full.xml | \\
|
||||||
sed 's/.*>\([^<]*\)<.*/\1/' | \\
|
sed 's/.*>\([^<]*\)<.*/\1/' | \\
|
||||||
sort | uniq); do \\
|
sort | uniq); do \\
|
||||||
VERSION=\$\$(grep -A1 "\$\$pack</product" \\
|
VERSION=\$\$(grep -A1 ">\$\$pack</product" \\
|
||||||
../$LFS_XML/tmp/lfs-full.xml | \\
|
../$LFS_XML/tmp/lfs-full.xml | \\
|
||||||
head -n2| \\
|
head -n2| \\
|
||||||
sed -n '2s/.*>\([^<]*\)<.*/\1/p'); \\
|
sed -n '2s/.*>\([^<]*\)<.*/\1/p'); \\
|
||||||
|
@ -232,6 +232,16 @@ update:
|
||||||
xmllint --format --postvalid track.tmp > \$(TRACKING_FILE); \\
|
xmllint --format --postvalid track.tmp > \$(TRACKING_FILE); \\
|
||||||
rm track.tmp; \\
|
rm track.tmp; \\
|
||||||
done; \\
|
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 \\
|
for file in *-*; do \\
|
||||||
xsltproc --stringparam packages ../packages.xml \\
|
xsltproc --stringparam packages ../packages.xml \\
|
||||||
--stringparam package \$\${file##*z-} \\
|
--stringparam package \$\${file##*z-} \\
|
||||||
|
|
Reference in a new issue