Changeset d3ce173 for blfs


Ignore:
Timestamp:
08/13/2006 02:38:12 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
824b6e4
Parents:
c0bc66d
Message:

Created BLFS master script code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • blfs

    rc0bc66d rd3ce173  
    11#!/bin/bash
     2# $Id$
     3
    24set -e
    35
    4 echo -e "\n  BLFS support has been dissabled for now.\n"
    56
    6 exit 0
     7#>>>>>>>>>>>>>>>ERROR TRAPPING >>>>>>>>>>>>>>>>>>>>
     8#-----------------------#
     9simple_error() {        # Basic error trap.... JUST DIE
     10#-----------------------#
     11  # If +e then disable text output
     12  if [[ "$-" =~ "e" ]]; then
     13    echo -e "\n${RED}ERROR:${GREEN} basic error trapped!${OFF}\n" >&2
     14  fi
     15}
     16
     17see_ya() {
     18    echo -e "\n\t${BOLD}Goodbye and thank you for choosing ${L_arrow}jhalfs${R_arrow}\n"
     19}
     20##### Simple error TRAPS
     21# ctrl-c   SIGINT
     22# ctrl-y
     23# ctrl-z   SIGTSTP
     24# SIGHUP   1 HANGUP
     25# SIGINT   2 INTRERRUPT FROM KEYBOARD Ctrl-C
     26# SIGQUIT  3
     27# SIGKILL  9 KILL
     28# SIGTERM 15 TERMINATION
     29# SIGSTOP 17,18,23 STOP THE PROCESS
     30#####
     31set -e
     32trap see_ya 0
     33trap simple_error ERR
     34trap 'echo -e "\n\n${RED}INTERRUPT${OFF} trapped\n" &&  exit 2'  1 2 3 15 17 18 23
     35#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
     36
     37VERBOSITY=1
     38
     39[[ $VERBOSITY > 0 ]] && echo -n "Loading config params from <configuration>..."
     40source configuration
     41[[ $? > 0 ]] && echo "file:configuration did not load.." && exit 1
     42[[ $VERBOSITY > 0 ]] && echo "OK"
     43
     44[[ -z $BOOK_BLFS ]] && echo -e "\nNo BLFS configuration found. Please configure it." && exit 1
     45
     46TREE=trunk/BOOK
     47
     48if [[ ! -z ${BRANCH_ID} ]]; then
     49  case $BRANCH_ID in
     50    dev* | SVN | trunk )  TREE=trunk/BOOK ;;
     51              branch-* )  TREE=branches/${BRANCH_ID#branch-}/BOOK ;;
     52                     * )  TREE=tags/${BRANCH_ID}/BOOK ;;
     53  esac
     54fi
     55
     56[[ ! -d $BLFS_ROOT ]] && mkdir -p $BLFS_ROOT
     57
     58cp -r BLFS/* $BLFS_ROOT
     59cp common/progress_bar.sh $BLFS_ROOT
     60# cp -r menu $BLFS_ROOT
     61
     62cd $BLFS_ROOT
     63
     64sed -i 's,blfs-xml,'$BLFS_XML',' update_book.sh
     65sed -i 's,blfs-xml,'$BLFS_XML',' libs/book.xsl
     66
     67./update_book.sh $BLFS_XML get $TREE
     68# make
     69
Note: See TracChangeset for help on using the changeset viewer.