Created BLFS master script code.
This commit is contained in:
parent
c0bc66d960
commit
d3ce1732ec
3 changed files with 92 additions and 7 deletions
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
<!-- $Id$ -->
|
<!-- $Id$ -->
|
||||||
|
|
||||||
<!-- NOTE: the base dir (blfs-xml) must be changed to FAKEDIR on the
|
<!-- NOTE: the base dir (blfs-xml) is set to the proper dir
|
||||||
final version and set it to the proper dir via a sed in ./blfs -->
|
via a sed in ./blfs -->
|
||||||
<xsl:import href="../blfs-xml/stylesheets/blfs-chunked.xsl"/>
|
<xsl:import href="../blfs-xml/stylesheets/blfs-chunked.xsl"/>
|
||||||
|
|
||||||
<xsl:param name="mail_server" select="sendmail"/>
|
<xsl:param name="mail_server" select="sendmail"/>
|
||||||
|
|
28
Config.in
28
Config.in
|
@ -22,8 +22,8 @@ menu "--- BOOK Settings"
|
||||||
config BOOK_HLFS
|
config BOOK_HLFS
|
||||||
bool "Hardened Linux From Scratch"
|
bool "Hardened Linux From Scratch"
|
||||||
|
|
||||||
# config BOOK_BLFS
|
config BOOK_BLFS
|
||||||
# bool "Beyond Linux From Scratch"
|
bool "Beyond Linux From Scratch"
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
config RUN_ME
|
config RUN_ME
|
||||||
|
@ -33,7 +33,7 @@ menu "--- BOOK Settings"
|
||||||
default "./clfs2" if BOOK_CLFS2
|
default "./clfs2" if BOOK_CLFS2
|
||||||
# default "./clfs3" if BOOK_CLFS3
|
# default "./clfs3" if BOOK_CLFS3
|
||||||
default "./hlfs" if BOOK_HLFS
|
default "./hlfs" if BOOK_HLFS
|
||||||
# default "./blfs" if BOOK_BLFS
|
default "./blfs" if BOOK_BLFS
|
||||||
#--- End BOOK/script
|
#--- End BOOK/script
|
||||||
|
|
||||||
#--- Book version
|
#--- Book version
|
||||||
|
@ -47,6 +47,7 @@ menu "--- BOOK Settings"
|
||||||
|
|
||||||
config WORKING_COPY
|
config WORKING_COPY
|
||||||
bool "Working Copy"
|
bool "Working Copy"
|
||||||
|
depends on !BOOK_BLFS
|
||||||
help
|
help
|
||||||
#-- A local working copy
|
#-- A local working copy
|
||||||
|
|
||||||
|
@ -277,10 +278,29 @@ menu "--- BOOK Settings"
|
||||||
default "uclibc" if LIB_UCLIBC
|
default "uclibc" if LIB_UCLIBC
|
||||||
#--- End HLFS specific params
|
#--- End HLFS specific params
|
||||||
|
|
||||||
|
#--- BLFS specific params
|
||||||
|
config BLFS_ROOT
|
||||||
|
string "Directory root"
|
||||||
|
default "$HOME/blfs_root"
|
||||||
|
depends on BOOK_BLFS
|
||||||
|
help
|
||||||
|
#-- Full path to the directory where all required
|
||||||
|
# files and scripts will be stored.
|
||||||
|
|
||||||
|
config BLFS_XML
|
||||||
|
string "BLFS sources directory"
|
||||||
|
default "blfs-xml"
|
||||||
|
depends on BOOK_BLFS
|
||||||
|
help
|
||||||
|
#-- The directory name where BLFS book sources
|
||||||
|
# will be checkout.
|
||||||
|
#--- End BLFS specific params
|
||||||
|
|
||||||
#--- End BOOK Settings
|
#--- End BOOK Settings
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "--- General Settings"
|
menu "--- General Settings"
|
||||||
|
depends on !BOOK_BLFS
|
||||||
|
|
||||||
#--- Set User Account
|
#--- Set User Account
|
||||||
config CONFIG_USER
|
config CONFIG_USER
|
||||||
|
@ -383,6 +403,7 @@ menu "--- General Settings"
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "--- Build Settings"
|
menu "--- Build Settings"
|
||||||
|
depends on !BOOK_BLFS
|
||||||
|
|
||||||
#--- Test Suites
|
#--- Test Suites
|
||||||
config CONFIG_TESTS
|
config CONFIG_TESTS
|
||||||
|
@ -548,6 +569,7 @@ menu "--- Build Settings"
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "--- Advanced Features"
|
menu "--- Advanced Features"
|
||||||
|
depends on !BOOK_BLFS
|
||||||
|
|
||||||
config CONFIG_REPORT
|
config CONFIG_REPORT
|
||||||
bool "Create SBU and disk usage report"
|
bool "Create SBU and disk usage report"
|
||||||
|
|
67
blfs
67
blfs
|
@ -1,6 +1,69 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# $Id$
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo -e "\n BLFS support has been dissabled for now.\n"
|
|
||||||
|
|
||||||
exit 0
|
#>>>>>>>>>>>>>>>ERROR TRAPPING >>>>>>>>>>>>>>>>>>>>
|
||||||
|
#-----------------------#
|
||||||
|
simple_error() { # Basic error trap.... JUST DIE
|
||||||
|
#-----------------------#
|
||||||
|
# If +e then disable text output
|
||||||
|
if [[ "$-" =~ "e" ]]; then
|
||||||
|
echo -e "\n${RED}ERROR:${GREEN} basic error trapped!${OFF}\n" >&2
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
see_ya() {
|
||||||
|
echo -e "\n\t${BOLD}Goodbye and thank you for choosing ${L_arrow}jhalfs${R_arrow}\n"
|
||||||
|
}
|
||||||
|
##### Simple error TRAPS
|
||||||
|
# ctrl-c SIGINT
|
||||||
|
# ctrl-y
|
||||||
|
# ctrl-z SIGTSTP
|
||||||
|
# SIGHUP 1 HANGUP
|
||||||
|
# SIGINT 2 INTRERRUPT FROM KEYBOARD Ctrl-C
|
||||||
|
# SIGQUIT 3
|
||||||
|
# SIGKILL 9 KILL
|
||||||
|
# SIGTERM 15 TERMINATION
|
||||||
|
# SIGSTOP 17,18,23 STOP THE PROCESS
|
||||||
|
#####
|
||||||
|
set -e
|
||||||
|
trap see_ya 0
|
||||||
|
trap simple_error ERR
|
||||||
|
trap 'echo -e "\n\n${RED}INTERRUPT${OFF} trapped\n" && exit 2' 1 2 3 15 17 18 23
|
||||||
|
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||||
|
|
||||||
|
VERBOSITY=1
|
||||||
|
|
||||||
|
[[ $VERBOSITY > 0 ]] && echo -n "Loading config params from <configuration>..."
|
||||||
|
source configuration
|
||||||
|
[[ $? > 0 ]] && echo "file:configuration did not load.." && exit 1
|
||||||
|
[[ $VERBOSITY > 0 ]] && echo "OK"
|
||||||
|
|
||||||
|
[[ -z $BOOK_BLFS ]] && echo -e "\nNo BLFS configuration found. Please configure it." && exit 1
|
||||||
|
|
||||||
|
TREE=trunk/BOOK
|
||||||
|
|
||||||
|
if [[ ! -z ${BRANCH_ID} ]]; then
|
||||||
|
case $BRANCH_ID in
|
||||||
|
dev* | SVN | trunk ) TREE=trunk/BOOK ;;
|
||||||
|
branch-* ) TREE=branches/${BRANCH_ID#branch-}/BOOK ;;
|
||||||
|
* ) TREE=tags/${BRANCH_ID}/BOOK ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
[[ ! -d $BLFS_ROOT ]] && mkdir -p $BLFS_ROOT
|
||||||
|
|
||||||
|
cp -r BLFS/* $BLFS_ROOT
|
||||||
|
cp common/progress_bar.sh $BLFS_ROOT
|
||||||
|
# cp -r menu $BLFS_ROOT
|
||||||
|
|
||||||
|
cd $BLFS_ROOT
|
||||||
|
|
||||||
|
sed -i 's,blfs-xml,'$BLFS_XML',' update_book.sh
|
||||||
|
sed -i 's,blfs-xml,'$BLFS_XML',' libs/book.xsl
|
||||||
|
|
||||||
|
./update_book.sh $BLFS_XML get $TREE
|
||||||
|
# make
|
||||||
|
|
||||||
|
|
Reference in a new issue