Changeset 5769ccd for BLFS


Ignore:
Timestamp:
05/26/2006 11:53:13 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
experimental
Children:
76e7afe
Parents:
da8017e
Message:

Improved packages.sh.
Started support for GNOME and KDE meta-packages.

Location:
BLFS
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • BLFS/packages.sh

    rda8017e r5769ccd  
    55set -e
    66
     7#---------------------
     8# packages module
     9source func_packages
     10[[ $? > 0 ]] && echo -e "\n\tERROR: func_packages did not load..\n" && exit
     11
     12
     13if [[ -z "$1" ]] ; then
     14  echo -e "n\tYou must to provide the name of the BLFS book sources directory.\n"
     15  exit 1
     16fi
     17
    718BLFS_XML=$1
    819
    9 > packages.tmp
     20if [[ ! -d $BLFS_XML ]] ; then
     21  echo -e "\n\t$BLFS_XML is not a directory\n"
     22  exit 1
     23fi
    1024
    11 for file in `find $BLFS_XML -name "*.xml"` ; do
    12   pkg_id=`grep "sect1 id" $file | sed -e 's/<sect1 id="//;s/".*//'`
    13   [[ ! -z "$pkg_id" ]] && echo -e "$pkg_id\t$file" >> packages.tmp
    14 done
     25if [[ ! -f $BLFS_XML/use-unzip.xml ]] ; then
     26  echo -e "\n\tLooks like $BLFS_XML is not a BLFS book sources directory\n"
     27  exit 1
     28fi
    1529
    16 sort packages.tmp -o packages
    17 rm packages.tmp
     30if [[ -n "$2" ]] ; then
     31  case $2 in
     32    update )
     33      if [[ -d $BLFS_XML/.svn ]] ; then
     34      echo -e "\n\tUpdating the $BLFS_XML book sources ...\n"
     35        pushd $BLFS_XML 1> /dev/null
     36        svn up
     37        popd 1> /dev/null
     38        echo -e "\n\tBook sources updated."
     39      else
     40        echo -e "\n\tLooks like $BLFS_XML is not a svn working copy."
     41        echo -e "\tSkipping BLFS sources update.\n"
     42      fi
     43      ;;
     44    * )
     45      echo -e "\n\tUnknown option $2 ignored.\n"
     46      ;;
     47  esac
     48fi
     49
     50echo -en "\n\tGenerating packages file ..."
     51generate_packages
     52echo "done."
     53
     54echo -en "\tGenerating gnome-core dependencies list ..."
     55generate_gnome_core
     56echo "done."
Note: See TracChangeset for help on using the changeset viewer.