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.
This commit is contained in:
Pierre Labastie 2022-03-30 12:27:03 +02:00
parent f45af2ca4d
commit 9f89fae89a
3 changed files with 2 additions and 9 deletions

View file

@ -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 <get_book>"
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"

View file

@ -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

2
jhalfs
View file

@ -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