source: BLFS/update_book.sh@ 97b041f

2.3 2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since 97b041f was 63a051c, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Trying to fix all sorting issues due user locale settings.

  • Property mode set to 100755
File size: 2.6 KB
RevLine 
[3c10176]1#!/bin/bash
2#
3# $Id$
4#
5set -e
6
7declare -r SVN="svn://svn.linuxfromscratch.org"
8
[f4ed135]9DOC_MODE=$1 # Action to take, update, get or none
10BLFS_XML=$2 # Book directory
[82aa9bf]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
[3c10176]16
[f4ed135]17TRACKING_DIR=tracking-dir
18
[3c10176]19#---------------------
20# packages module
21source libs/func_packages
22[[ $? > 0 ]] && echo -e "\n\tERROR: func_packages did not load..\n" && exit
23
24#----------------------------#
25BOOK_Source() { #
26#----------------------------#
27: <<inline_doc
[82aa9bf]28 function: Retrieve or upate a copy of the BLFS book
29 input vars: $1 BLFS_XML book sources directory
[3c10176]30 $2 DOC_MODE action get/update
[82aa9bf]31 $3 TREE SVN tree when $2=get
[3c10176]32 externals: none
33 modifies: $BLFS_XML directory tree
34 returns: nothing
[4cbc48f]35 output:
[3c10176]36 on error: exit
37 on success: text messages
38inline_doc
39
[82aa9bf]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 ;;
[4cbc48f]62
[82aa9bf]63 get )
64 [[ ! -d $BLFS_XML ]] && mkdir -pv $BLFS_XML
65 svn co $SVN/BLFS/$TREE $BLFS_XML 2>&1
[3c10176]66 ;;
[82aa9bf]67 * )
68 echo -e "\n\tUnknown option ${DOC_MODE} ignored.\n"
69 ;;
70 esac
[3c10176]71}
72
[f4ed135]73[ "${DOC_MODE}" != "none" ] && BOOK_Source
74
75if [ "${DOC_MODE}" = "none" ] ; then
76 echo -en "\n\tGenerating packages database file ..."
[63a051c]77 generate_packages
[f4ed135]78 echo "done."
79
80 echo -en "\tGenerating alsa dependencies list ..."
81 generate_alsa
82 echo "done."
83
84 echo -en "\tGenerating gnome-core dependencies list ..."
85 generate_gnome_core
86 echo "done."
[3c10176]87
[f4ed135]88 echo -en "\tGenerating gnome-full dependencies list ..."
89 generate_gnome_full
90 echo "done."
[3c10176]91
[f4ed135]92 echo -en "\tGenerating kde-core dependencies list ..."
93 generate_kde_core
94 echo "done."
[3c10176]95
[f4ed135]96 echo -en "\tGenerating kde-full dependencies list ..."
97 generate_kde_full
98 echo -e "done."
[3c10176]99
[f4ed135]100 echo -en "\tGenerating kde-koffice dependencies list ..."
101 generate_kde_koffice
102 echo -e "done."
[3c10176]103
[f4ed135]104 echo -en "\tGenerating xorg7 dependencies list ..."
105 generate_xorg7
106 echo "done."
107fi
[3c10176]108
Note: See TracBrowser for help on using the repository browser.