Changeset 65d7d46


Ignore:
Timestamp:
12/23/2013 09:56:10 PM (10 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
2.4, ablfs-more, legacy, new_features, trunk
Children:
c1626d8
Parents:
532ede6
Message:

Update install-blfs-tools to new prerequisite checks, and make
it more customisable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • install-blfs-tools.sh

    r532ede6 r65d7d46  
    22# $Id$
    33set -e
     4
     5: << inline_doc
     6Installs a set-up to build BLFS packages.
     7You can set these variables:
     8TRACKING_DIR  : where the installed package file is kept.
     9                 (default /var/lib/jhalfs/BLFS)
     10BLFS_ROOT     : where the installed tools will be installed, relative to $HOME.
     11                Must start with a '/' (default /blfs_root)
     12BLFS_BRANCH_ID: development, branch-xxx, xxx (where xxx is a valid tag)
     13                (default development)
     14Examples:
     151 - If you plan to use the tools to build BLFS on top of LFS, but you did not
     16use jhalfs, or forgot to include the jhalfs-blfs tools:
     17(as root) mkdir -p /var/lib/jhalfs/BLFS && chown -R user /var/lib/jhalfs
     18(as user) ./install-blfs-tools
     192 - To install with only user privileges:
     20TRACKING_DIR=/home/user/blfs_root/trackdir ./install-blfs-tools
     21inline_doc
     22
    423
    524# VT100 colors
     
    3655BLFS_TOOL='y'
    3756BUILDDIR=$(cd ~;pwd)
    38 BLFS_ROOT="/blfs_root"
    39 TRACKING_DIR="/var/lib/jhalfs/BLFS"
     57BLFS_ROOT="${BLFS_ROOT:=/blfs_root}"
     58TRACKING_DIR="${TRACKING_DIR:=/var/lib/jhalfs/BLFS}"
    4059
    4160[[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}"
     
    5978# Check for build prerequisites.
    6079echo
    61   check_prerequisites
     80  check_alfs_tools
     81  check_blfs_tools
    6282echo "${SD_BORDER}${nl_}"
    6383
     
    82102sed -i s@tracking-dir@$TRACKING_DIR@ \
    83103    ${BUILDDIR}${BLFS_ROOT}/{Makefile,gen-makefile.sh}
     104
     105# Ensures the tracking directory exists.
     106# Throws an error if it does not exist and the user does not
     107# have write permission to create it.
     108# If it exists, does nothing.
     109mkdir -p $TRACKING_DIR
    84110[[ $VERBOSITY > 0 ]] && echo "... OK"
    85111
Note: See TracChangeset for help on using the changeset viewer.