From 9f89fae89a8b7b14dfce3ebf280fa921da25842a Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Wed, 30 Mar 2022 12:27:03 +0200 Subject: [PATCH] LFS: Simplify git repo management Use inly one variable, REPO, containing the LFS git repo url. The BLFS Makefile hardcodes the LFS and BLFS git repo urls, so no need to pass them. --- common/libs/func_book_parser | 7 +------ common/libs/func_install_blfs | 2 -- jhalfs | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/common/libs/func_book_parser b/common/libs/func_book_parser index 9a3a540..131766d 100644 --- a/common/libs/func_book_parser +++ b/common/libs/func_book_parser @@ -12,16 +12,11 @@ get_book() { # echo -n "Downloading the $PROGNAME document, $LFSVRS version... " - case $PROGNAME in - lfs) git_root="lfs.git" ;; - *) echo "BOOK not defined in function " - exit 1 ;; - esac # Grab a fresh book if it's missing, otherwise, update it from the # repo. If we've already extracted the commands, move on to getting the # sources. if [ ! -d ${PROGNAME}-${LFSVRS}/.git ]; then - git clone $GIT/$git_root ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1 + git clone $REPO ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1 if [ ! $TREE == "development" ]; then pushd ${PROGNAME}-$LFSVRS > /dev/null echo "Checking out $LFSVRS at $PWD in $TREE" diff --git a/common/libs/func_install_blfs b/common/libs/func_install_blfs index 20761d9..cedf0db 100644 --- a/common/libs/func_install_blfs +++ b/common/libs/func_install_blfs @@ -49,10 +49,8 @@ sudo make -j1 -C $BUILDDIR$BLFS_ROOT \ REV=$INITSYS \ TRACKING_DIR=$BUILDDIR$TRACKING_DIR \ LFS_XML=$BUILDDIR$BLFS_ROOT/$LFS_XML \ - LFS-GIT=$GIT/lfs.git \ LFS-BRANCH=${LFS_TREE} \ BLFS_XML=$BUILDDIR$BLFS_ROOT/$BLFS_XML \ - GIT=$GIT/blfs.git \ BLFS-BRANCH=${BLFS_TREE} \ $BUILDDIR$BLFS_ROOT/packages.xml diff --git a/jhalfs b/jhalfs index 2f03b1f..e112dd9 100755 --- a/jhalfs +++ b/jhalfs @@ -219,7 +219,7 @@ BOOK=${BOOK:=$JHALFSDIR/$PROGNAME-$LFSVRS} #--- Envars not sourced from configuration # shellcheck disable=SC2034 -declare -r GIT="git://git.linuxfromscratch.org" +declare -r REPO=git://git.linuxfromscratch.org/lfs.git declare -r LOG=000-masterscript.log # Set true internal variables