source: BLFS/func_packages@ 76e7afe

experimental
Last change on this file since 76e7afe was 76e7afe, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Removed unneeded depuration line.

  • Property mode set to 100644
File size: 1.6 KB
RevLine 
[5769ccd]1#!/bin/bash
2#
3# $Id$
4#
5set -e
6
7#-----------------------#
8generate_packages() { # Master packages file
9#-----------------------#
10 local pkg_id file
11
12 > packages.tmp
13
14 # Extract Id and path for sect1 files
15 for file in `find $BLFS_XML -name "*.xml"` ; do
16 pkg_id=`grep "sect1 id" $file | sed -e 's/<sect1 id="//;s/".*//'`
17 [[ ! -z "$pkg_id" ]] && echo -e "$pkg_id\t$file" >> packages.tmp
18 done
19
20 # IDs clean-up (unuseful pages or commented-out packages, could be more)
21 sed -i '/template/d;/ntroduction/d;/preface/d' packages.tmp
22 sed -i '/courier.xml/d' packages.tmp
23 sed -i '/nautilus-media.xml/d;/gal.xml/d;/gpdf.xml/d;/gv.xml/d' packages.tmp
24
25 # Add header with meta-packages pseudo Id
26{
27 cat << EOF
28
29=== GNOME META-PACKAGES ===
30# GNOME base packages
31gnome-core $BLFS_XML
32# All GNOME packages
33gnome-full $BLFS_XML
34
35=== KDE META-PACKAGES ===
36# KDE base packages
37kde-core $BLFS_XML
38# All KDE packages
39kde $BLFS_XML
40# All KDE packages plus Koffice
41kde-full $BLFS_XML
42
43=== INDIVIDUAL PACKAGES ===
44
45EOF
46} > packages
47
48 # Dump packages list
49 sort packages.tmp >> packages
50
51 # Clean up
52 rm packages.tmp
53}
54
55# Pre-made *.dep files for meta-packages
56
57#--------------------------#
58generate_gnome_core() { # GNOME core
59#--------------------------#
60 local line base_xml package
61
62 > gnome-core.dep.tmp
63
64 for line in `grep "xi:include" $BLFS_XML/gnome/core/core.xml` ; do
65 base_xml=`echo $line | sed 's/^.*href="//;s/".*//'`
66 package=`grep "gnome/core/$base_xml" packages | cut -f1`
67 [[ -n "$package" ]] && echo $package >> gnome-core.dep.tmp
68 done
69
70 tac gnome-core.dep.tmp > gnome-core.dep
71 rm gnome-core.dep.tmp
72}
73
Note: See TracBrowser for help on using the repository browser.