Changeset b3825c3 for jhalfs


Ignore:
Timestamp:
05/01/2021 07:21:06 AM (3 years ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, legacy, trunk
Children:
4ed4a32
Parents:
dfab075
Message:

Adapt jhalfs to git

Note that the *_TREE var names should be changed to something related to
branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jhalfs

    rdfab075 rb3825c3  
    200200    case $PROGNAME in
    201201      clfs* ) TREE="" ;;
    202           * ) TREE=trunk/BOOK ;;
     202          * ) TREE=trunk ;;
    203203    esac
    204204    LFSVRS=development
     
    211211      lfs )
    212212        LFSVRS=${BRANCH_ID}
    213         TREE=branches/${BRANCH_ID#branch-}
    214         if [ ${BRANCH_ID:7:1} = 6 ]; then
    215             TREE=${TREE}/BOOK
    216         fi
     213        TREE=${BRANCH_ID#branch-}
    217214        ;;
    218215      clfs* )
     
    226223      lfs )
    227224        LFSVRS=${BRANCH_ID}
    228         TREE=tags/${BRANCH_ID}
    229         case ${BRANCH_ID:0:2} in
    230             [1-9][0-9]) ;;
    231             [789]*) ;;
    232             *) TREE=${TREE}/BOOK ;;
    233         esac
     225        TREE=${BRANCH_ID}
    234226        ;;
    235227      hlfs )
     
    256248  clfs2 ) declare -r GIT="git://git.clfs.org/clfs-sysroot" ;;
    257249  clfs3 ) declare -r GIT="git://git.clfs.org/clfs-embedded" ;;
    258   *) declare -r SVN="svn://svn.linuxfromscratch.org" ;;
     250  *) declare -r GIT="git://git.linuxfromscratch.org" ;;
    259251esac
    260252
     
    262254# Needed for fetching BLFS book sources when building CLFS
    263255# shellcheck disable=SC2034
    264 declare -r SVN_2="svn://svn.linuxfromscratch.org"
     256# declare -r GIT="git://git.linuxfromscratch.org"
    265257
    266258# Set true internal variables
     
    304296  check_blfs_tools
    305297  simple_message "${SD_BORDER}${nl_}"
    306   BLFS_SVN=${BLFS_SVN:-n}
     298  BLFS_GIT=${BLFS_GIT:-n}
    307299  BLFS_WORKING_COPY=${BLFS_WORKING_COPY:-n}
    308300  BLFS_BRANCH=${BLFS_BRANCH:-n}
    309   if [[ "${BLFS_SVN}" = "y" ]]; then
     301  if [[ "${BLFS_GIT}" = "y" ]]; then
    310302    BLFS_BRANCH_ID=development
    311     BLFS_TREE=trunk/BOOK
     303    BLFS_TREE=trunk
    312304  elif [[ "${BLFS_WORKING_COPY}" = "y" ]]; then
    313305    if [[ ! -d "$BLFS_WC_LOCATION/postlfs" ]] ; then
     
    316308      exit 2
    317309    fi
    318     BLFS_TREE=$(cd "$BLFS_WC_LOCATION"; svn info | grep '^URL' | sed 's@.*BLFS/@@')
    319     BLFS_BRANCH_ID=$(echo "$BLFS_TREE" | sed -e 's@trunk/BOOK@development@' \
    320                                              -e 's@branches/@branch-@' \
    321                                              -e 's@tags/@@' \
    322                                              -e 's@/BOOK@@')
     310    BLFS_TREE=$(cd $BLFS_WC_LOCATION; git branch --show-current)
     311    BLFS_BRANCH_ID=${BLFS_TREE/trunk/development}
    323312  elif [[ "${BLFS_BRANCH}" = "y" ]] ; then
    324313    case $BLFS_BRANCH_ID in
     
    326315                     echo " Please rerun make and fix the configuration."
    327316                     exit 2 ;;
    328        branch-6.* )  BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-}/BOOK ;;
    329          branch-* )  BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-} ;;
    330     [isv]* | 6.3* )  BLFS_TREE=tags/${BLFS_BRANCH_ID}/BOOK ;;
    331                 * )  BLFS_TREE=tags/${BLFS_BRANCH_ID} ;;
     317                * )  BLFS_TREE=${BLFS_BRANCH_ID#branch-}
    332318    esac
    333319  fi
Note: See TracChangeset for help on using the changeset viewer.