Author: pierre
Date: Thu Aug 17 04:27:07 2017
New Revision: 4000

Log:
Fix grepping for VERSION (func_install_blfs)
Add LFS-Release (update-lfs.sh and func_install_blfs)

Modified:
   jhalfs/trunk/BLFS/update-lfs.sh
   jhalfs/trunk/common/libs/func_install_blfs

Modified: jhalfs/trunk/BLFS/update-lfs.sh
==============================================================================
--- jhalfs/trunk/BLFS/update-lfs.sh     Sat Aug 12 06:07:05 2017        (r3999)
+++ jhalfs/trunk/BLFS/update-lfs.sh     Thu Aug 17 04:27:07 2017        (r4000)
@@ -95,25 +95,38 @@
 #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

Modified: jhalfs/trunk/common/libs/func_install_blfs
==============================================================================
--- jhalfs/trunk/common/libs/func_install_blfs  Sat Aug 12 06:07:05 2017        
(r3999)
+++ jhalfs/trunk/common/libs/func_install_blfs  Thu Aug 17 04:27:07 2017        
(r4000)
@@ -219,7 +219,7 @@
        @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 @@
            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-} \\
-- 
http://lists.linuxfromscratch.org/listinfo/alfs-log
Unsubscribe: See the above information page

Reply via email to