r2822 - in jhalfs/trunk: . CLFS HLFS LFS common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sun Jul 16 03:06:04 PDT 2006


Author: manuel
Date: 2006-07-16 04:06:03 -0600 (Sun, 16 Jul 2006)
New Revision: 2822

Modified:
   jhalfs/trunk/CLFS/config
   jhalfs/trunk/HLFS/config
   jhalfs/trunk/LFS/config
   jhalfs/trunk/common/common-functions
   jhalfs/trunk/common/func_validate_configs.sh
   jhalfs/trunk/master.sh
Log:
Avoiding hardcoded supported books versions.

Modified: jhalfs/trunk/CLFS/config
===================================================================
--- jhalfs/trunk/CLFS/config	2006-07-13 20:25:46 UTC (rev 2821)
+++ jhalfs/trunk/CLFS/config	2006-07-16 10:06:03 UTC (rev 2822)
@@ -68,6 +68,7 @@
 
 #--- Book version
 LFSVRS=development
+TREE=trunk/BOOK
 
 #--- Name of the makefile
 MKFILE=$JHALFSDIR/Makefile

Modified: jhalfs/trunk/HLFS/config
===================================================================
--- jhalfs/trunk/HLFS/config	2006-07-13 20:25:46 UTC (rev 2821)
+++ jhalfs/trunk/HLFS/config	2006-07-16 10:06:03 UTC (rev 2822)
@@ -38,6 +38,7 @@
 
 #--- Book version
 LFSVRS=development
+TREE=trunk/BOOK
 
 #--- Name of the makefile
 MKFILE=$JHALFSDIR/Makefile

Modified: jhalfs/trunk/LFS/config
===================================================================
--- jhalfs/trunk/LFS/config	2006-07-13 20:25:46 UTC (rev 2821)
+++ jhalfs/trunk/LFS/config	2006-07-16 10:06:03 UTC (rev 2822)
@@ -32,6 +32,7 @@
 
 #--- Book version
 LFSVRS=development
+TREE=trunk/BOOK
 
 #--- Name of the makefile
 MKFILE=$JHALFSDIR/Makefile

Modified: jhalfs/trunk/common/common-functions
===================================================================
--- jhalfs/trunk/common/common-functions	2006-07-13 20:25:46 UTC (rev 2821)
+++ jhalfs/trunk/common/common-functions	2006-07-16 10:06:03 UTC (rev 2822)
@@ -52,8 +52,12 @@
 
 ${BOLD}  -B, --book VER${OFF}
         use VER version of the book as the system to build.
-        Supported versions are: dev*, trunk, SVN
-        These are aliases for the Development version of {C,H}LFS
+        Supported VER values are:
+          dev*, trunk, SVN = aliases for the Development version of {C,H}LFS
+          branch-NAME = a branch of name NAME
+          VERSION = the version of a stable released book
+        To know what branches and stable books works with this version of jhalfs
+        please see http://wiki.linuxfromscratch.org/alfs/wiki/SupportedBooks
 
 ${BOLD}  -D  --directory DIR${OFF}
         use DIR directory for building ${BOLD}$(echo $PROGNAME | tr [a-z] [A-Z])${OFF}; all files jhalfs produces
@@ -653,7 +657,7 @@
          test -d $JHALFSDIR/${PROGNAME}-commands && \
          test -f $JHALFSDIR/pkg_tarball_list ; then
         # Set the canonical book version
-        echo -ne "done\n" 
+        echo -ne "done\n"
         cd $JHALFSDIR
         case $PROGNAME in
           clfs)
@@ -667,10 +671,7 @@
         extract_commands
       fi
     else
-      case $LFSVRS in
-        development)
-           svn co $SVN/${svn_root}/trunk/BOOK ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1 ;;
-      esac
+      svn co $SVN/${svn_root}/${TREE} ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1
       echo -ne "done\n"
       extract_commands
     fi
@@ -679,7 +680,7 @@
     echo -ne "Using $BOOK as book's sources ...\n"
     extract_commands
   fi
-  echo -ne " Document version ${L_arrow}${BOLD}${VERSION}${R_arrow}\n" 
+  echo -ne " Document version ${L_arrow}${BOLD}${VERSION}${R_arrow}\n"
 }
 
 #----------------------------#
@@ -692,7 +693,7 @@
 
   cd $JHALFSDIR
   case $PROGNAME in
-    clfs) 
+    clfs)
       VERSION=$(xmllint --noent $BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //'  -e 's/<\/.*//') ;;
     *)
       VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //'  -e 's/<\/.*//')  ;;

Modified: jhalfs/trunk/common/func_validate_configs.sh
===================================================================
--- jhalfs/trunk/common/func_validate_configs.sh	2006-07-13 20:25:46 UTC (rev 2821)
+++ jhalfs/trunk/common/func_validate_configs.sh	2006-07-16 10:06:03 UTC (rev 2822)
@@ -216,7 +216,7 @@
       BOOK)        if [[ "${WC}" = "1" ]] ; then
                      validate_dir -z -d
                    else
-                     validate_against_str "x${PROGNAME}-developmentx"
+                     validate_against_str "x${PROGNAME}-${LFSVRS}x"
                    fi ;;
 
       # Validate directories, testable states:

Modified: jhalfs/trunk/master.sh
===================================================================
--- jhalfs/trunk/master.sh	2006-07-13 20:25:46 UTC (rev 2821)
+++ jhalfs/trunk/master.sh	2006-07-16 10:06:03 UTC (rev 2822)
@@ -105,23 +105,24 @@
       case $1 in
         dev* | SVN | trunk )
           LFSVRS=development
+          TREE=trunk/BOOK
           ;;
-        *) if [[ "$PROGNAME" = "lfs" ]]; then
-             case $1 in
-               6.1.1 )
-                 echo "For stable 6.1.1 book, please use jhalfs-0.2."
-                 exit 0
-                ;;
-               * )
-                 echo "$1 is an unsupported version at this time."
-                 exit 0
-                ;;
-             esac
-           else
-             echo "The requested version, ${L_arrow} ${BOLD}$1${OFF} ${R_arrow}, is undefined in the ${BOLD}$(echo $PROGNAME | tr [a-z] [A-Z])${OFF} series."
-             exit 0
-           fi
+        branch-* )
+          LFSVRS=$1
+          TREE=branches/${1#branch-}/BOOK
           ;;
+        * )
+          case $PROGNAME in
+            lfs | hlfs )
+              LFSVRS=$1
+              TREE=tags/$1/BOOK
+              ;;
+            clfs )
+              LFSVRS=$1
+              TREE=tags/$1
+              ;;
+          esac
+          ;;
       esac
       ;;
 




More information about the alfs-log mailing list