7 declare -r SVN
="svn://svn.linuxfromscratch.org"
9 DOC_MODE
=$1 # Action to take, update, get or none
10 BLFS_XML
=$2 # Book directory
11 TREE
=$3 # SVN tree for the BLFS book version
13 [[ -z $BLFS_XML ]] && BLFS_XML
=blfs-xml
14 [[ -z $DOC_MODE ]] && DOC_MODE
=update
15 [[ -z $TREE ]] && TREE
=trunk
/BOOK
17 TRACKING_DIR
=tracking-dir
19 #---------------------
21 source libs
/func_packages
22 [[ $?
> 0 ]] && echo -e "\n\tERROR: func_packages did not load..\n" && exit
24 #----------------------------#
26 #----------------------------#
28 function: Retrieve or upate a copy of the BLFS book
29 input vars: $1 BLFS_XML book sources directory
30 $2 DOC_MODE action get/update
31 $3 TREE SVN tree when $2=get
33 modifies: $BLFS_XML directory tree
37 on success: text messages
42 if [[ ! -d $BLFS_XML ]] ; then
43 echo -e "\n\t$BLFS_XML is not a directory\n"
46 if [[ ! -f $BLFS_XML/x
/x.xml
]] ; then
47 echo -e "\n\tLooks like $BLFS_XML is not a BLFS book sources directory\n"
51 if [[ -d $BLFS_XML/.svn
]] ; then
52 echo -e "\n\tUpdating the $BLFS_XML book sources ...\n"
53 pushd $BLFS_XML 1> /dev
/null
56 echo -e "\n\tBook sources updated."
58 echo -e "\n\tLooks like $BLFS_XML is not a svn working copy."
59 echo -e "\tSkipping BLFS sources update.\n"
64 [[ ! -d $BLFS_XML ]] && mkdir
-pv $BLFS_XML
65 svn co
$SVN/BLFS
/$TREE $BLFS_XML 2>&1
68 echo -e "\n\tUnknown option ${DOC_MODE} ignored.\n"
73 [ "${DOC_MODE}" != "none" ] && BOOK_Source
75 if [ "${DOC_MODE}" = "none" ] ; then
76 echo -en "\n\tGenerating packages database file ..."
80 echo -en "\tGenerating alsa dependencies list ..."
84 echo -en "\tGenerating gnome-core dependencies list ..."
88 echo -en "\tGenerating gnome-full dependencies list ..."
92 echo -en "\tGenerating kde-core dependencies list ..."
96 echo -en "\tGenerating kde-full dependencies list ..."
100 echo -en "\tGenerating kde-koffice dependencies list ..."
104 echo -en "\tGenerating xorg7 dependencies list ..."