- Timestamp:
- 08/13/2006 11:15:07 AM (18 years ago)
- Branches:
- 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
- Children:
- 8cb88dc
- Parents:
- cb18ec7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/packages.sh
rcb18ec7 r82aa9bf 8 8 9 9 BLFS_XML=$1 # Book directory 10 DOC_MODE=$2 # Action to take, only update at the moment 10 DOC_MODE=$2 # Action to take, update or get 11 TREE=$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 11 16 12 17 #--------------------- … … 19 24 #----------------------------# 20 25 : <<inline_doc 21 function: Retrieve a fresh copy or upate an existing copy of the BLFS svn tree22 input vars: $1 BLFS_XML directory26 function: Retrieve or upate a copy of the BLFS book 27 input vars: $1 BLFS_XML book sources directory 23 28 $2 DOC_MODE action get/update 29 $3 TREE SVN tree when $2=get 24 30 externals: none 25 31 modifies: $BLFS_XML directory tree … … 30 36 inline_doc 31 37 32 # Redundant definitions but this function may be reused 33 local BLFS_XML=$1 34 local DOC_MODE=$2 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 35 48 36 if [[ -z "$BLFS_XML" ]] ; then 37 echo -e "\n\tYou must to provide the name of the BLFS book sources directory.\n" 38 exit 1 39 fi 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 ;; 40 60 41 if [[ -n "$DOC_MODE" ]] ; then 42 case $DOC_MODE in 43 update ) 44 if [[ ! -d $BLFS_XML ]] ; then 45 echo -e "\n\t$BLFS_XML is not a directory\n" 46 exit 1 47 fi 48 if [[ ! -f $BLFS_XML/x/x.xml ]] ; then 49 echo -e "\n\tLooks like $BLFS_XML is not a BLFS book sources directory\n" 50 exit 1 51 fi 52 53 if [[ -d $BLFS_XML/.svn ]] ; then 54 echo -e "\n\tUpdating the $BLFS_XML book sources ...\n" 55 pushd $BLFS_XML 1> /dev/null 56 svn up 57 popd 1> /dev/null 58 echo -e "\n\tBook sources updated." 59 else 60 echo -e "\n\tLooks like $BLFS_XML is not a svn working copy." 61 echo -e "\tSkipping BLFS sources update.\n" 62 fi 63 ;; 64 65 get ) 66 [[ ! -d $BLFS_XML ]] && mkdir -pv $BLFS_XML 67 svn co $SVN/BLFS/trunk/BOOK $BLFS_XML 2>&1 68 ;; 69 * ) 70 echo -e "\n\tUnknown option ${DOC_MODE} ignored.\n" 61 get ) 62 [[ ! -d $BLFS_XML ]] && mkdir -pv $BLFS_XML 63 svn co $SVN/BLFS/$TREE $BLFS_XML 2>&1 71 64 ;; 72 esac 73 fi 65 * ) 66 echo -e "\n\tUnknown option ${DOC_MODE} ignored.\n" 67 ;; 68 esac 74 69 } 75 70 76 BOOK_Source $BLFS_XML $DOC_MODE71 BOOK_Source 77 72 78 73 echo -en "\n\tGenerating packages file ..."
Note:
See TracChangeset
for help on using the changeset viewer.