[00f4966] | 1 | #!/bin/bash
|
---|
| 2 | #
|
---|
| 3 | # $Id$
|
---|
| 4 | #
|
---|
| 5 | set -e
|
---|
| 6 |
|
---|
| 7 | declare -r SVN="svn://svn.linuxfromscratch.org"
|
---|
| 8 |
|
---|
| 9 | BLFS_XML=$1 # Book directory
|
---|
| 10 | DOC_MODE=$2 # Action to take, update or get
|
---|
| 11 | TREE=$3 # SVN tree for the BLFS book version
|
---|
| 12 |
|
---|
| 13 | [[ -z $BLFS_XML ]] && BLFS_XML=blfs-xml
|
---|
| 14 | [[ -z $DOC_MODE ]] && DOC_MODE=update
|
---|
| 15 | [[ -z $TREE ]] && TREE=trunk/BOOK
|
---|
| 16 |
|
---|
[cac94f6] | 17 | TRACKING_DIR=tracking-dir
|
---|
| 18 |
|
---|
[00f4966] | 19 | #---------------------
|
---|
| 20 | # packages module
|
---|
| 21 | source libs/func_packages
|
---|
| 22 | [[ $? > 0 ]] && echo -e "\n\tERROR: func_packages did not load..\n" && exit
|
---|
| 23 |
|
---|
| 24 | #----------------------------#
|
---|
| 25 | BOOK_Source() { #
|
---|
| 26 | #----------------------------#
|
---|
| 27 | : <<inline_doc
|
---|
| 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
|
---|
| 32 | externals: none
|
---|
| 33 | modifies: $BLFS_XML directory tree
|
---|
| 34 | returns: nothing
|
---|
| 35 | output:
|
---|
| 36 | on error: exit
|
---|
| 37 | on success: text messages
|
---|
| 38 | inline_doc
|
---|
| 39 |
|
---|
| 40 | case $DOC_MODE in
|
---|
| 41 | update )
|
---|
| 42 | if [[ ! -d $BLFS_XML ]] ; then
|
---|
| 43 | echo -e "\n\t$BLFS_XML is not a directory\n"
|
---|
| 44 | exit 1
|
---|
| 45 | fi
|
---|
| 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"
|
---|
| 48 | exit 1
|
---|
| 49 | fi
|
---|
| 50 |
|
---|
| 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
|
---|
| 54 | svn up
|
---|
| 55 | popd 1> /dev/null
|
---|
| 56 | echo -e "\n\tBook sources updated."
|
---|
| 57 | else
|
---|
| 58 | echo -e "\n\tLooks like $BLFS_XML is not a svn working copy."
|
---|
| 59 | echo -e "\tSkipping BLFS sources update.\n"
|
---|
| 60 | fi
|
---|
| 61 | ;;
|
---|
| 62 |
|
---|
| 63 | get )
|
---|
| 64 | [[ ! -d $BLFS_XML ]] && mkdir -pv $BLFS_XML
|
---|
| 65 | svn co $SVN/BLFS/$TREE $BLFS_XML 2>&1
|
---|
| 66 | ;;
|
---|
| 67 | * )
|
---|
| 68 | echo -e "\n\tUnknown option ${DOC_MODE} ignored.\n"
|
---|
| 69 | ;;
|
---|
| 70 | esac
|
---|
| 71 | }
|
---|
| 72 |
|
---|
| 73 | BOOK_Source
|
---|
| 74 |
|
---|
[8b0d3b3] | 75 | echo -en "\n\tGenerating packages database file ..."
|
---|
[00f4966] | 76 | generate_packages
|
---|
| 77 | echo "done."
|
---|
| 78 |
|
---|
[323f805] | 79 | echo -en "\tGenerating alsa dependencies list ..."
|
---|
| 80 | generate_alsa
|
---|
| 81 | echo "done."
|
---|
| 82 |
|
---|
[00f4966] | 83 | echo -en "\tGenerating gnome-core dependencies list ..."
|
---|
| 84 | generate_gnome_core
|
---|
| 85 | echo "done."
|
---|
| 86 |
|
---|
| 87 | echo -en "\tGenerating gnome-full dependencies list ..."
|
---|
| 88 | generate_gnome_full
|
---|
| 89 | echo "done."
|
---|
| 90 |
|
---|
| 91 | echo -en "\tGenerating kde-core dependencies list ..."
|
---|
| 92 | generate_kde_core
|
---|
| 93 | echo "done."
|
---|
| 94 |
|
---|
| 95 | echo -en "\tGenerating kde-full dependencies list ..."
|
---|
| 96 | generate_kde_full
|
---|
[323f805] | 97 | echo -e "done."
|
---|
| 98 |
|
---|
| 99 | echo -en "\tGenerating kde-koffice dependencies list ..."
|
---|
| 100 | generate_kde_koffice
|
---|
| 101 | echo -e "done."
|
---|
| 102 |
|
---|
| 103 | echo -en "\tGenerating xorg7 dependencies list ..."
|
---|
| 104 | generate_xorg7
|
---|
| 105 | echo "done."
|
---|
[00f4966] | 106 |
|
---|