Changeset 2fd624d for common


Ignore:
Timestamp:
03/30/2022 12:26:41 PM (2 years ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, trunk
Children:
2bd2fb8
Parents:
9f89fae
Message:

Get rid of BRANCH_ID, TREE, LFSVRS variables

There is only one variable: COMMIT. Note that this commit
also changes $PROGNAME-$LFSVRS to $BOOK.

Location:
common/libs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • common/libs/func_book_parser

    r9f89fae r2fd624d  
    66  cd $JHALFSDIR
    77
    8   if [ -z $WORKING_COPY ] ; then
     8  if [ -z "$WORKING_COPY" ] ; then
    99# Check for Subversion or git instead of just letting the script fail.
    1010    test `type -p git` || eval "echo \"This feature requires Git.\"
    1111    exit 1"
    1212
    13     echo -n "Downloading the $PROGNAME document, $LFSVRS version... "
     13    echo -n "Downloading the lfs document, $COMMIT commit... "
    1414
    1515    # Grab a fresh book if it's missing, otherwise, update it from the
    1616    # repo. If we've already extracted the commands, move on to getting the
    1717    # sources.
    18     if [ ! -d ${PROGNAME}-${LFSVRS}/.git ]; then
    19         git clone $REPO ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1
    20         if [ ! $TREE == "development" ]; then
    21            pushd ${PROGNAME}-$LFSVRS > /dev/null
    22            echo "Checking out $LFSVRS at $PWD in $TREE"
    23            git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
    24            popd > /dev/null
     18    if [ ! -d "$BOOK"/.git ]; then
     19        git clone "$REPO" "$BOOK" >>"$LOGDIR/$LOG" 2>&1
     20        if [ "$COMMIT" != trunk ]; then
     21           pushd "$BOOK" >/dev/null
     22           echo "Checking out $COMMIT at $PWD"
     23           git checkout "$COMMIT" >>"$LOGDIR/$LOG" 2>&1
     24           popd >/dev/null
    2525        fi
    2626    else
    27       cd ${PROGNAME}-$LFSVRS
     27      cd "$BOOK"
    2828      # If the repo is in "detached head" state, git pull fails, so get
    29       # back first to master:
    30       git checkout trunk >>$LOGDIR/$LOG 2>&1
    31       git pull >>$LOGDIR/$LOG 2>&1
    32       if [ ! $TREE == "development" ]; then
    33          git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
     29      # back first to trunk:
     30      git checkout trunk >>"$LOGDIR/$LOG" 2>&1
     31      git pull >>"$LOGDIR/$LOG" 2>&1
     32      if [ "$COMMIT" != "trunk" ]; then
     33         git checkout "$COMMIT" >>"$LOGDIR/$LOG" 2>&1
    3434      fi
    3535    fi
  • common/libs/func_install_blfs

    r9f89fae r2fd624d  
    5050          TRACKING_DIR=$BUILDDIR$TRACKING_DIR    \
    5151          LFS_XML=$BUILDDIR$BLFS_ROOT/$LFS_XML   \
    52           LFS-BRANCH=${LFS_TREE}                 \
     52          LFS-BRANCH="${COMMIT}"                 \
    5353          BLFS_XML=$BUILDDIR$BLFS_ROOT/$BLFS_XML \
    5454          BLFS-BRANCH=${BLFS_TREE}               \
Note: See TracChangeset for help on using the changeset viewer.