Ignore:
Timestamp:
04/01/2022 08:26:17 AM (2 years ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, trunk
Children:
924a237
Parents:
30a444a
Message:

Change variable names and logic for BLFS book

Only use BLFS_COMMIT instead of BLFS_BRANCH_ID, BLFS_TREE, BLFS_BOOK
Same for le LFS_BLFS variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • install-blfs-tools.sh

    r30a444a r9b99ada  
    1111BLFS_ROOT     : where the installed tools will be installed, relative to $HOME.
    1212                Must start with a '/' (default /blfs_root)
    13 BLFS_BRANCH_ID: development, branch-xxx, xxx (where xxx is a valid tag)
    14                 (default development)
    15 LFS_BRANCH_ID : development, branch-xxx, xxx (where xxx is a valid tag)
    16                 (default development)
     13BLFS_COMMIT   : any commit (branch/tag/sha)
     14                (default trunk)
     15LFS_COMMIT    : any commit (branch/tag/sha)
     16                (default trunk)
    1717Examples:
    18181 - If you plan to use the tools to build BLFS on top of LFS, but you did not
     
    6868if [ "$BOOK_BLFS" = y ]; then
    6969## Read variables and sanity checks
    70   [[ "$relGIT" = y ]] && BLFS_BRANCH_ID=development
    71   [[ "$BRANCH" = y ]] && BLFS_BRANCH_ID=$BRANCH_ID
     70  [[ "$BRANCH" = y ]] && BLFS_COMMIT=$COMMIT
    7271  [[ "$WORKING_COPY" = y ]] && BLFS_BOOK=$BOOK
    73   [[ "$BRANCH_ID" = "**EDIT ME**" ]] &&
    74     echo You have not set the BLFS book version or branch && exit 1
    7572  [[ "$BOOK" = "**EDIT ME**" ]] &&
    7673    echo You have not set the BLFS working copy location && exit 1
    77   [[ "$LFS_relGIT" = y ]] && LFS_BRANCH_ID=development
    78   [[ "$LFS_BRANCH" = y ]] && LFS_BRANCH_ID=$BLFS_LFS_BRANCH_ID
     74  [[ "$LFS_BRANCH" = y ]] && LFS_COMMIT=$BLFS_LFS_COMMIT
    7975  [[ "$LFS_WORKING_COPY" = y ]] && LFS_BOOK=$BLFS_LFS_BOOK
    80   [[ "$LFS_BRANCH_ID" = "**EDIT ME**" ]] &&
    81     echo You have not set the LFS book version or branch && exit 1
    8276  [[ "$LFS_BOOK" = "**EDIT ME**" ]] &&
    8377    echo You have not set the LFS working copy location && exit 1
     
    9185TRACKING_DIR="${TRACKING_DIR:=/var/lib/jhalfs/BLFS}"
    9286INITSYS="${INITSYS:=sysv}"
    93 BLFS_BRANCH_ID=${BLFS_BRANCH_ID:=development}
    94 LFS_BRANCH_ID=${LFS_BRANCH_ID:=development}
     87BLFS_COMMIT=${BLFS_COMMIT:=trunk}
     88LFS_COMMIT=${LFS_COMMIT:=trunk}
    9589BLFS_XML=${BLFS_XML:=blfs-xml}
    9690LFS_XML=${LFS_XML:=lfs-xml}
     
    10195  PARAMS="$PARAMS WORKING_COPY BLFS_BOOK"
    10296else
    103   PARAMS="$PARAMS BLFS_BRANCH_ID"
     97  PARAMS="$PARAMS BLFS_COMMIT"
    10498fi
    10599if [ "$LFS_WORKING_COPY" = y ]; then
    106100  PARAMS="$PARAMS LFS_WORKING_COPY LFS_BOOK"
    107101else
    108   PARAMS="$PARAMS LFS_BRANCH_ID"
     102  PARAMS="$PARAMS LFS_COMMIT"
    109103fi
    110104# Format for displaying parameters:
     
    131125
    132126[[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}"
    133 
    134 case $BLFS_BRANCH_ID in
    135      development )  BLFS_TREE=trunk ;;
    136         branch-* )  BLFS_TREE=${BLFS_BRANCH_ID#branch-} ;;
    137                * )  BLFS_TREE=${BLFS_BRANCH_ID} ;;
    138 esac
    139 case $LFS_BRANCH_ID in
    140   development )  LFS_TREE=trunk ;;
    141      branch-* )  LFS_TREE=${LFS_BRANCH_ID#branch-} ;;
    142             * )  LFS_TREE=${LFS_BRANCH_ID} ;;
    143 esac
    144127
    145128# Check for build prerequisites.
     
    194177     REV=$INITSYS            \
    195178     LFS_XML=$BUILDDIR$BLFS_ROOT/$LFS_XML      \
    196      LFS-GIT=git://git.linuxfromscratch.org/lfs.git \
    197      LFS-BRANCH=${LFS_TREE}                      \
     179     LFS-BRANCH=${LFS_COMMIT}                      \
    198180     BLFS_XML=$BUILDDIR$BLFS_ROOT/$BLFS_XML      \
    199      GIT=git://git.linuxfromscratch.org/blfs.git \
    200      BLFS-BRANCH=${BLFS_TREE}                    \
     181     BLFS-BRANCH=${BLFS_COMMIT}                    \
    201182     $BUILDDIR$BLFS_ROOT/packages.xml
    202183[[ $VERBOSITY > 0 ]] && echo "... OK"
Note: See TracChangeset for help on using the changeset viewer.