source: jhalfs@ 82eacf5

ablfs-more legacy trunk
Last change on this file since 82eacf5 was e5518fd, checked in by Pierre Labastie <pierre.labastie@…>, 4 years ago

jhalfs: update copyright years and adapt to git

  • use git log to retrieve the most recent version to display with -v
  • Property mode set to 100755
File size: 15.0 KB
RevLine 
[4da2512]1#!/bin/bash
2set -e
[bbcdeab]3# Pass trap handlers to functions
4set -E
[4da2512]5
6# VT100 colors
7declare -r RED=$'\e[31m'
8declare -r GREEN=$'\e[32m'
9declare -r YELLOW=$'\e[33m'
10
[0e4ddfa]11# shellcheck disable=SC2034
12declare -r BLUE=$'\e[34m'
[4da2512]13declare -r OFF=$'\e[0m'
14declare -r BOLD=$'\e[1m'
15declare -r tab_=$'\t'
16declare -r nl_=$'\n'
17
[0e4ddfa]18# shellcheck disable=SC2034
[4da2512]19declare -r DD_BORDER="${BOLD}==============================================================================${OFF}"
[0e4ddfa]20# shellcheck disable=SC2034
[4da2512]21declare -r SD_BORDER="${BOLD}------------------------------------------------------------------------------${OFF}"
[0e4ddfa]22# shellcheck disable=SC2034
[4da2512]23declare -r STAR_BORDER="${BOLD}******************************************************************************${OFF}"
24
25# bold yellow > < pair
26declare -r R_arrow=$'\e[1;33m>\e[0m'
27declare -r L_arrow=$'\e[1;33m<\e[0m'
28
29
30#>>>>>>>>>>>>>>>ERROR TRAPPING >>>>>>>>>>>>>>>>>>>>
31#-----------------------#
32simple_error() { # Basic error trap.... JUST DIE
33#-----------------------#
[0e4ddfa]34 LASTLINE="$1"
35 LASTERR="$2"
36 LASTSOURCE="$4"
37 error_message "${GREEN} Error $LASTERR at $LASTSOURCE line ${LASTLINE}!"
[4da2512]38}
39
40see_ya() {
[0e4ddfa]41 printf '\n%b%bjhalfs%b exit%b\n' "$L_arrow" "$BOLD" "$R_arrow" "$OFF"
[4da2512]42}
43##### Simple error TRAPS
44# ctrl-c SIGINT
45# ctrl-y
46# ctrl-z SIGTSTP
47# SIGHUP 1 HANGUP
48# SIGINT 2 INTRERRUPT FROM KEYBOARD Ctrl-C
49# SIGQUIT 3
50# SIGKILL 9 KILL
51# SIGTERM 15 TERMINATION
52# SIGSTOP 17,18,23 STOP THE PROCESS
53#####
54set -e
55trap see_ya 0
[bbcdeab]56trap 'simple_error "${LINENO}" "$?" "${FUNCNAME}" "${BASH_SOURCE}"' ERR
[d505128]57trap 'echo -e "\n\n${RED}INTERRUPT${OFF} trapped\n" && exit 2' \
58 HUP INT QUIT TERM # STOP stops tterminal output and does not seem to
59 # execute the handler
[4da2512]60#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
61
[0e4ddfa]62simple_message() {
63 # Prevents having to check $VERBOSITY everywhere
64 if [ "$VERBOSITY" -ne 0 ] ; then
65 # shellcheck disable=SC2059
66 printf "$*"
67 fi
68}
69
70warning_message() {
71 simple_message "${YELLOW}\\nWARNING:${OFF} $*\\n\\n"
72}
73
74error_message() {
75 # Prints an error message and exits with LASTERR or 1
76 if [ -n "$LASTERR" ] ; then
77 LASTERR=$(printf '%d' "$LASTERR")
78 else
79 LASTERR=1
80 fi
81 # If +e then disable text output
82 if [[ "$-" =~ e ]]; then
83 printf '\n\n%bERROR:%b %s\n' "$RED" "$OFF" "$*" >&2
84 fi
85 exit "$LASTERR"
86}
87
88load_file() {
89 # source files in a consistent way with an optional message
90 file="$1"
91 shift
92 msg="Loading file ${file}..."
93 [ -z "$*" ] || msg="$*..."
94 simple_message "$msg"
95
96 # shellcheck disable=SC1090
97 source "$file" 2>/dev/null || error_message "$file did not load"
98 simple_message "OK\\n"
99}
100
[e5518fd]101git_commit=$(git log -1 --format=format:"%h %ad")
[4da2512]102version="
[e5518fd]103${BOLD} \"jhalfs\"${OFF} builder tool (development) $git_commit
[4da2512]104
[e5518fd]105 Copyright (C) 2005-2021, the jhalfs team:
[f596dde]106 Jeremy Huntwork
107 George Boudreau
108 Manuel Canales Esparcia
109 Thomas Pegg
110 Matthew Burgess
111 Pierre Labastie
[4da2512]112
[f596dde]113 Unless specified, all the files in this directory and its sub-directories
114 are subjected to the ${BOLD}MIT license${OFF}. See the ${BOLD}LICENSE${OFF} file.
[4da2512]115
[f596dde]116 The files in the ${BOLD}menu${OFF} directory are subjected to the ${BOLD}ISC License${OFF}.
117 See ${BOLD}LICENSE.txt${OFF} and ${BOLD}README${OFF} in that directory.
[4da2512]118"
119
[f596dde]120usage="${nl_}${tab_}${BOLD}${RED}This script cannot be called directly${OFF}
121${tab_}Type ${BOLD}make${OFF} to run the tool, or
122${tab_}Type ${BOLD}./jhalfs -v${OFF} to display version information."
123
[4da2512]124case $1 in
[909ee37]125 -v ) echo "$version" && exit ;;
[4da2512]126 run ) : ;;
[f596dde]127 * ) echo "$usage" && exit 1 ;;
[4da2512]128esac
129
[65c998b]130# If the user has not saved his configuration file, let's ask
131# if he or she really wants to run this stuff
[a22bfe1]132time_current=$(stat -c '%Y' configuration 2>/dev/null || date +%s)
[cf2f109]133time_old=$(stat -c '%Y' configuration.old 2>/dev/null || printf '%s' "$time_current")
[a22bfe1]134if [ "$(printf '%d' "$time_old")" -ge "$(printf '%d' "$time_current")" ] ; then
135 printf 'Do you want to run jhalfs? yes/no (yes): '
[0e4ddfa]136 read -r ANSWER
[a22bfe1]137 case ${ANSWER:0:1} in
138 n|N) printf "\nExiting gracefully.\n"; exit ;;
139 esac
[65c998b]140fi
141
142# Change this to 0 to suppress almost all messages
[4da2512]143VERBOSITY=1
144
[0e4ddfa]145load_file configuration "Loading config params from <configuration>"
[4da2512]146
147# These are boolean vars generated from Config.in.
[7072e1f]148# ISSUE: If a boolean parameter is not set to y(es) there
149# is no variable defined by the menu app. This can
150# cause a headache if you are not aware.
151# The following variables MUST exist. If they don't, the
152# default value is n(o).
[4da2512]153RUNMAKE=${RUNMAKE:-n}
154GETPKG=${GETPKG:-n}
155COMPARE=${COMPARE:-n}
156RUN_ICA=${RUN_ICA:-n}
[7072e1f]157PKGMNGT=${PKGMNGT:-n}
[945ccaa]158WRAP_INSTALL=${WRAP_INSTALL:-n}
[4da2512]159BOMB_TEST=${BOMB_TEST:-n}
160STRIP=${STRIP:=n}
161REPORT=${REPORT:=n}
[085435e]162NCURSES5=${NCURSES5:-n}
[dc7fd7b]163DEL_LA_FILES=${DEL_LA_FILES:-n}
[b339c94]164FULL_LOCALE=${FULL_LOCALE:-n}
[4da2512]165GRSECURITY_HOST=${GRSECURITY_HOST:-n}
[9a536f7]166CUSTOM_TOOLS=${CUSTOM_TOOLS:-n}
[a16f769]167REBUILD_MAKEFILE=${REBUILD_MAKEFILE:-n}
[93346ee]168INSTALL_LOG=${INSTALL_LOG:-n}
[486e9a7]169CLEAN=${CLEAN:=n}
[d035526]170SET_SSP=${SET_SSP:=n}
171SET_ASLR=${SET_ASLR:=n}
172SET_PAX=${SET_PAX:=n}
173SET_HARDENED_TMP=${SET_HARDENED_TMP:=n}
174SET_WARNINGS=${SET_WARNINGS:=n}
175SET_MISC=${SET_MISC:=n}
176SET_BLOWFISH=${SET_BLOWFISH:=n}
[945ccaa]177UNICODE=${UNICODE:=n}
[3b43e17b]178LOCAL=${LOCAL:=n}
[84a3fda]179REALSBU=${REALSBU:=n}
[f5ecc28]180SAVE_CH5=${SAVE_CH5:=n}
[4da2512]181
[75d6d1c]182if [[ "${NO_PROGRESS_BAR}" = "y" ]] ; then
[0e4ddfa]183# shellcheck disable=SC2034
184 NO_PROGRESS="#"
[75d6d1c]185fi
186
[38ae01f]187# Sanity check on the location of $BUILDDIR / $JHALFSDIR
[0e4ddfa]188CWD="$(cd "$(dirname "$0")" && pwd)"
189if [[ $JHALFSDIR == "$CWD" ]]; then
190 echo " The jhalfs source directory conflicts with the jhalfs build directory."
191 echo " Please move the source directory or change the build directory."
192 exit 2
[38ae01f]193fi
194
[0873ccc]195# Book sources envars
[4965fa8]196BRANCH_ID=${BRANCH_ID:=development}
197
198case $BRANCH_ID in
199 development )
200 case $PROGNAME in
[92b7cb8]201 clfs* ) TREE="" ;;
[c4ad7bf]202 * ) TREE=trunk/BOOK ;;
[4965fa8]203 esac
204 LFSVRS=development
205 ;;
206 *EDIT* ) echo " You forgot to set the branch or stable book version."
207 echo " Please rerun make and fix the configuration."
208 exit 2 ;;
209 branch-* )
[c4ad7bf]210 case $PROGNAME in
211 lfs )
212 LFSVRS=${BRANCH_ID}
[bb2862d]213 TREE=branches/${BRANCH_ID#branch-}
[dd08e14]214 if [ ${BRANCH_ID:7:1} = 6 ]; then
[bb2862d]215 TREE=${TREE}/BOOK
216 fi
[c4ad7bf]217 ;;
218 clfs* )
219 LFSVRS=${BRANCH_ID}
220 TREE=${BRANCH_ID#branch-}
221 ;;
222 esac
[4965fa8]223 ;;
224 * )
225 case $PROGNAME in
[e650dc7]226 lfs )
227 LFSVRS=${BRANCH_ID}
228 TREE=tags/${BRANCH_ID}
[7e9e66f]229 case ${BRANCH_ID:0:2} in
[f7c6c3c]230 [1-9][0-9]) ;;
[7e9e66f]231 [789]*) ;;
232 *) TREE=${TREE}/BOOK ;;
233 esac
[e650dc7]234 ;;
235 hlfs )
[4965fa8]236 LFSVRS=${BRANCH_ID}
237 TREE=tags/${BRANCH_ID}/BOOK
238 ;;
[92b7cb8]239 clfs* )
[4965fa8]240 LFSVRS=${BRANCH_ID}
[34d1b6a]241 TREE=clfs-${BRANCH_ID}
[4965fa8]242 ;;
[92b7cb8]243 * )
[4965fa8]244 esac
245 ;;
246esac
247
[4da2512]248# Set the document location...
[1cf621b]249BOOK=${BOOK:=$JHALFSDIR/$PROGNAME-$LFSVRS}
[4da2512]250
[4965fa8]251
[728955b]252#--- Envars not sourced from configuration
[0e4ddfa]253# shellcheck disable=SC2034
[728955b]254case $PROGNAME in
[0e4ddfa]255 clfs ) declare -r GIT="git://git.clfs.org/cross-lfs" ;;
256 clfs2 ) declare -r GIT="git://git.clfs.org/clfs-sysroot" ;;
257 clfs3 ) declare -r GIT="git://git.clfs.org/clfs-embedded" ;;
258 *) declare -r SVN="svn://svn.linuxfromscratch.org" ;;
[728955b]259esac
[0e4ddfa]260
[728955b]261declare -r LOG=000-masterscript.log
[0e4ddfa]262# Needed for fetching BLFS book sources when building CLFS
263# shellcheck disable=SC2034
[728955b]264declare -r SVN_2="svn://svn.linuxfromscratch.org"
265
[4da2512]266# Set true internal variables
267COMMON_DIR="common"
[0e4ddfa]268PACKAGE_DIR=$(echo "$PROGNAME" | tr '[:lower:]' '[:upper:]')
[4da2512]269MODULE=$PACKAGE_DIR/master.sh
[7072e1f]270PKGMNGTDIR="pkgmngt"
271# The name packageManager.xml is hardcoded in *.xsl, so no variable.
[4da2512]272
[0e4ddfa]273for file in \
274 "$COMMON_DIR/common-functions" \
275 "$COMMON_DIR/libs/func_book_parser" \
276 "$COMMON_DIR/libs/func_download_pkgs" \
277 "$COMMON_DIR/libs/func_wrt_Makefile" \
278 "$MODULE" ; do
279 load_file "$file"
280done
[9a536f7]281
[0e4ddfa]282simple_message "${SD_BORDER}${nl_}"
[9a536f7]283
284
[0e4ddfa]285#*******************************************************************#
286LASTERR=2
287for file in \
288 "$COMMON_DIR/libs/func_check_version.sh" \
289 "$COMMON_DIR/libs/func_validate_configs.sh" \
290 "$COMMON_DIR/libs/func_custom_pkgs" ; do
291 load_file "$file"
292done
293unset LASTERR
294
295simple_message "${SD_BORDER}${nl_}"
[183cc33]296simple_message "Checking tools required for jhalfs${nl_}"
[6ed3dd7]297check_alfs_tools
[0e4ddfa]298simple_message "${SD_BORDER}${nl_}"
[4da2512]299
[e576789]300# blfs-tool envars
301BLFS_TOOL=${BLFS_TOOL:-n}
302if [[ "${BLFS_TOOL}" = "y" ]] ; then
[0e4ddfa]303 simple_message 'Checking supplementary tools for installing BLFS'
[6ed3dd7]304 check_blfs_tools
[0e4ddfa]305 simple_message "${SD_BORDER}${nl_}"
[854854e]306 BLFS_SVN=${BLFS_SVN:-n}
307 BLFS_WORKING_COPY=${BLFS_WORKING_COPY:-n}
308 BLFS_BRANCH=${BLFS_BRANCH:-n}
309 if [[ "${BLFS_SVN}" = "y" ]]; then
310 BLFS_BRANCH_ID=development
311 BLFS_TREE=trunk/BOOK
312 elif [[ "${BLFS_WORKING_COPY}" = "y" ]]; then
[0e4ddfa]313 if [[ ! -d "$BLFS_WC_LOCATION/postlfs" ]] ; then
[854854e]314 echo " BLFS tools: This is not a working copy: $BLFS_WC_LOCATION."
315 echo " Please rerun make and fix the configuration."
316 exit 2
[0e4ddfa]317 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@@')
[0ba80be]323 elif [[ "${BLFS_BRANCH}" = "y" ]] ; then
[854854e]324 case $BLFS_BRANCH_ID in
325 *EDIT* ) echo " You forgot to set the BLFS branch or stable book version."
326 echo " Please rerun make and fix the configuration."
327 exit 2 ;;
[dd08e14]328 branch-6.* ) BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-}/BOOK ;;
329 branch-* ) BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-} ;;
[91b5249]330 [isv]* | 6.3* ) BLFS_TREE=tags/${BLFS_BRANCH_ID}/BOOK ;;
331 * ) BLFS_TREE=tags/${BLFS_BRANCH_ID} ;;
[854854e]332 esac
333 fi
[0e4ddfa]334 load_file "${COMMON_DIR}/libs/func_install_blfs"
[e576789]335fi
[4da2512]336
337###################################
338### MAIN ###
339###################################
340
341
342validate_config
343echo "${SD_BORDER}${nl_}"
344echo -n "Are you happy with these settings? yes/no (no): "
[0e4ddfa]345read -r ANSWER
346if [ "x$ANSWER" != "xyes" ] ; then
[881c96f]347 echo "${nl_}Rerun make to fix the configuration options.${nl_}"
[d023a35]348 exit
[4da2512]349fi
350echo "${nl_}${SD_BORDER}${nl_}"
351
352# Load additional modules or configuration files based on global settings
353# compare module
354if [[ "$COMPARE" = "y" ]]; then
[0e4ddfa]355 load_file "${COMMON_DIR}/libs/func_compare.sh" 'Loading compare module'
[4da2512]356fi
357#
[f5ecc28]358# save module
359if [[ "$SAVE_CH5" = "y" ]]; then
360 load_file "${COMMON_DIR}/libs/func_save.sh" 'Loading save module'
361fi
362#
[4da2512]363# optimize module
364if [[ "$OPTIMIZE" != "0" ]]; then
[0e4ddfa]365 load_file optimize/optimize_functions 'Loading optimization module'
[4da2512]366 #
367 # optimize configurations
[0e4ddfa]368 load_file optimize/opt_config 'Loading optimization config'
[854854e]369 # The number of parallel jobs is taken from configuration now
[0e4ddfa]370 # shellcheck disable=SC2034
[9ef12f7]371 JH_MAKEFLAGS="-j${N_PARALLEL}"
[4da2512]372 # Validate optimize settings, if required
373 validate_opt_settings
374fi
375#
376
[a16f769]377if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then
[4da2512]378
[200fbde]379# If requested, clean the build directory
[7b6ecc5]380 clean_builddir
[4da2512]381
[7b6ecc5]382 if [[ ! -d $JHALFSDIR ]]; then
[0e4ddfa]383 sudo mkdir -p "$JHALFSDIR"
384 sudo chown "$USER":"$USER" "$JHALFSDIR"
[7b6ecc5]385 fi
[3e7ceed]386
[200fbde]387# Create $BUILDDIR/sources even though it could be created by get_sources()
[7b6ecc5]388 if [[ ! -d $BUILDDIR/sources ]]; then
[0e4ddfa]389 sudo mkdir -p "$BUILDDIR/sources"
390 sudo chmod a+wt "$BUILDDIR/sources"
[7b6ecc5]391 fi
[200fbde]392
393# Create the log directory
[7b6ecc5]394 if [[ ! -d $LOGDIR ]]; then
[0e4ddfa]395 mkdir "$LOGDIR"
[7b6ecc5]396 fi
[0e4ddfa]397 true >"$LOGDIR/$LOG"
[200fbde]398
399# Copy common helper files
[0e4ddfa]400 cp "$COMMON_DIR"/{makefile-functions,progress_bar.sh} "$JHALFSDIR/"
[200fbde]401
402# Copy needed stylesheets
[0e4ddfa]403 cp "$COMMON_DIR"/{packages.xsl,chroot.xsl,kernfs.xsl} "$JHALFSDIR/"
[200fbde]404
405# Fix the XSL book parser
[92b7cb8]406 case $PROGNAME in
[0e4ddfa]407 clfs* ) sed 's,FAKEDIR,'"${BOOK}/BOOK"',' "${PACKAGE_DIR}/${XSL}" > "${JHALFSDIR}/${XSL}" ;;
408 lfs | hlfs ) sed 's,FAKEDIR,'"$BOOK"',' "${PACKAGE_DIR}/${XSL}" > "${JHALFSDIR}/${XSL}" ;;
[92b7cb8]409 * ) ;;
410 esac
[3e7ceed]411 export XSL=$JHALFSDIR/${XSL}
[7b6ecc5]412
[200fbde]413# Copy packageManager.xml, if needed
[3aa1acd]414 [[ "$PKGMNGT" = "y" ]] && [[ "$PROGNAME" = "lfs" ]] && {
[5a965ad]415 sed s@BOOK@"$BOOK"@ "$PKGMNGTDIR/packageManager.xml" > \
416 "$JHALFSDIR/"packageManager.xml
[0e4ddfa]417 cp "$PKGMNGTDIR/packInstall.sh" "$JHALFSDIR/"
[3aa1acd]418 }
[200fbde]419
420# Copy urls.xsl, if needed
[0e4ddfa]421 [[ "$GETPKG" = "y" ]] && cp "$COMMON_DIR/urls.xsl" "$JHALFSDIR/"
[200fbde]422
[c672fa8]423# Always create the test-log directory to allow user to "uncomment" test
424# instructions
[0e4ddfa]425 install -d -m 1777 "$TESTLOGDIR"
[200fbde]426
427# Create the installed-files directory, if needed
[0e4ddfa]428 [[ "$INSTALL_LOG" = "y" ]] && [[ ! -d $FILELOGDIR ]] && install -d -m 1777 "$FILELOGDIR"
[200fbde]429
430# Prepare report creation, if needed
[7b6ecc5]431 if [[ "$REPORT" = "y" ]]; then
[0e4ddfa]432 cp $COMMON_DIR/create-sbu_du-report.sh "$JHALFSDIR/"
[7072e1f]433 # After making sure that all looks sane, dump the settings to a file
[7b6ecc5]434 # This file will be used to create the REPORT header
[0e4ddfa]435 validate_config >"$JHALFSDIR/jhalfs.config"
[7b6ecc5]436 fi
[200fbde]437
438# Copy optimize files, if needed
[0e4ddfa]439 [[ "$OPTIMIZE" != "0" ]] && cp optimize/opt_override "$JHALFSDIR/"
[200fbde]440
441# Copy compare files, if needed
[3e7ceed]442 if [[ "$COMPARE" = "y" ]]; then
[0e4ddfa]443 mkdir -p "$JHALFSDIR/extras"
444 cp extras/* "$JHALFSDIR/extras"
[3e7ceed]445 fi
[200fbde]446
447# Copy custom tools config files, if requested
[3e7ceed]448 if [[ "${CUSTOM_TOOLS}" = "y" ]]; then
449 echo "Copying custom tool scripts to $JHALFSDIR"
[0e4ddfa]450 mkdir -p "$JHALFSDIR/custom-commands"
451 cp -f custom/config/* "$JHALFSDIR/custom-commands"
[3e7ceed]452 fi
[200fbde]453
[f733772]454# Download or updates the book source
455# Note that all customization to $JHALFSDIR have to be done before this.
456# But the LFS book is needed for BLFS tools.
457 get_book
[ebe1ba6]458# At this point, we should have a way to know whether we have a cross
459# or regular book... In case of cross, prohibite TEST=3
460# the position of gcc-pass2 (chapter 6 or 5) tells us (not valid for
461# cross-chap5 branch).
462 if (( TEST == 3 )) && \
[6447575]463 [ -f "$BOOK/chapter06/gcc-pass2.xml" ]; then
[ebe1ba6]464 TEST=2
465 fi
[f733772]466 extract_commands
467 echo "${SD_BORDER}${nl_}"
[0e4ddfa]468 cd "$CWD" # the functions above change directory
[f733772]469
[200fbde]470# Install blfs-tool, if requested.
[7b6ecc5]471 if [[ "${BLFS_TOOL}" = "y" ]] ; then
[6ed3dd7]472 echo Installing BLFS book and tools
[0e4ddfa]473 install_blfs_tools 2>&1 | tee -a "$LOGDIR/$LOG"
[bbcdeab]474 [[ ${PIPESTATUS[0]} != 0 ]] && exit 1
[7b6ecc5]475 fi
476
[4965fa8]477fi
478
[0e4ddfa]479# shellcheck disable=SC2034
[a16f769]480if [[ "$REBUILD_MAKEFILE" = "y" ]] ; then
[8b85dae]481# Sanity check: users tend to tick "rebuild Makefile"
482# without generating one first. Check we have one:
483 if [ ! -f $MKFILE ]; then
484 set -e
485 error_message "You cannot \"rebuild Makefile\" without first building one"
486 fi
487# When regenerating the Makefile, we need to know also the
488# canonical book version
[a16f769]489 case $PROGNAME in
[92b7cb8]490 clfs* )
[0e4ddfa]491 VERSION=$(xmllint --noent "$BOOK/prologue/$ARCH/bookinfo.xml" 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
[c9598f2]492 lfs)
493 if [[ "$INITSYS" = "sysv" ]] ; then
[0e4ddfa]494 VERSION=$(grep 'ENTITY version ' "$BOOK/general.ent" | cut -d\" -f2)
[c9598f2]495 else
[0e4ddfa]496 VERSION=$(grep 'ENTITY versiond' "$BOOK/general.ent" | cut -d\" -f2)
[c9598f2]497 fi
498 ;;
[a16f769]499 *)
[0e4ddfa]500 VERSION=$(xmllint --noent "$BOOK/prologue/bookinfo.xml" 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
[a16f769]501 esac
502fi
503
[4da2512]504build_Makefile
[3e7ceed]505
[4da2512]506echo "${SD_BORDER}${nl_}"
507
[1cf621b]508# Check for build prerequisites.
509 echo
[0e4ddfa]510 cd "$CWD"
[1cf621b]511 check_prerequisites
512 echo "${SD_BORDER}${nl_}"
513# All is well, run the build (if requested)
[4da2512]514run_make
Note: See TracBrowser for help on using the repository browser.