source: BLFS/update_book.sh@ 491e09b

experimental
Last change on this file since 491e09b was 323f805, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Pre-generating dep files for alsa, kde-koffice, and xorg7.

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