Changeset 2369 for scripts


Ignore:
Timestamp:
10/30/07 12:07:14 (6 years ago)
Author:
alanbach-guest
Message:

autobuild system now supports new packages inserted using svn-inject

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/autobuild.bash

    r2364 r2369  
    55# 
    66# Created: 2007-10-20 15:10 +330 GMT 
    7 # Updated: 2007-10-30 08:56 +330 GMT 
     7# Updated: 2007-10-30 14:35 +330 GMT 
    88# 
    99# TODO: 
     
    123123POOL=`find ./ -type d | grep /$SRC_PKG_NAME$ | awk 'BEGIN{FS="/"}{print $3}'` 
    124124 
     125if [ -z "$POOL" ]; then 
     126      echo "${GREEN}Couldn't detect pool folder name, trying to calculate...${NORMAL}" 
     127 
     128      case "$SRC_PKG_NAME" in 
     129            lib*) 
     130                POOL=`echo $SRC_PKG_NAME | cut -c1-4`  
     131            ;; 
     132            *) 
     133                POOL=`echo $SRC_PKG_NAME | cut -c1`  
     134            ;; 
     135      esac 
     136      echo "${GREEN}Detected pool as: ${YELLOW}$POOL${NORMAL}" 
     137fi 
     138 
    125139cd $SVN_REPO_PATH 
    126140COMPONENT=`find ./ -maxdepth 2 -type d | grep /$SRC_PKG_NAME$ | awk 'BEGIN{FS="/"}{print $2}'` 
     
    129143    echo "${GREEN}Detected component: ${YELLOW}$COMPONENT${NORMAL}" 
    130144else 
    131     echo "${GREEN}Couldn't detect component, exiting...${NORMAL}" 
    132     exit 
     145    echo "${GREEN}Couldn't detect component, updating SVN...${NORMAL}" 
     146    # Local working copy is out dated? 
     147    svn up --username $SVN_USER --password $SVN_PASS &> /dev/null 
     148    COMPONENT=`find ./ -maxdepth 2 -type d | grep /$SRC_PKG_NAME$ | awk 'BEGIN{FS="/"}{print $2}'` 
    133149fi 
    134150 
     
    137153    cd $SVN_REPO_PATH/$COMPONENT/$SRC_PKG_NAME 
    138154else 
    139     # Local working copy is out dated? 
    140     svn up --username $SVN_USER --password $SVN_PASS &> /dev/null 
    141     if [ -d $SVN_REPO_PATH/$COMPONENT/$SRC_PKG_NAME ]; then 
    142          cd $SVN_REPO_PATH/$COMPONENT/$SRC_PKG_NAME 
    143     else 
    144          echo "${GREEN}SVN directory does not exists, exiting...${NORMAL}" 
    145          exit 
    146     fi 
     155    echo "${GREEN}SVN directory does not exists, exiting...${NORMAL}" 
     156    exit 
    147157fi 
    148158 
     
    230240 
    231241             echo "${GREEN}Copying orig tarball to the local apt repo...${NORMAL}" 
     242 
     243             # Not exists? Create it! 
     244             if [ ! -d "$LOCAL_REPO_PATH/$COMPONENT/$POOL/$SRC_PKG_NAME" ]; then 
     245                  mkdir -p "$LOCAL_REPO_PATH/$COMPONENT/$POOL/$SRC_PKG_NAME" 
     246             fi 
     247 
    232248             cp *."$TARBALL_EXT" "$LOCAL_REPO_PATH/$COMPONENT/$POOL/$SRC_PKG_NAME/" -v >> $LOG_FILE 
    233249 
     
    277293     echo "${GREEN}Tagging $SRC_PKG_NAME $UPSTREAM_VERSION-$PKG_REVISION" >> $LOG_FILE 
    278294 
     295     if [ ! -d tags ]; then 
     296         mkdir tags &> /dev/null 
     297         svn add tags &> /dev/null 
     298     fi 
     299 
    279300     svn copy trunk/ tags/$UPSTREAM_VERSION-$PKG_REVISION &> /dev/null 
    280301     svn commit -m "BUILDD: Tagging $SRC_PKG_NAME $UPSTREAM_VERSION-$PKG_REVISION" --username $SVN_USER --password $SVN_PASS &> /dev/null 
     
    282303     echo "${GREEN}Tagging ${YELLOW}$SRC_PKG_NAME $UPSTREAM_VERSION${NORMAL} ${GREEN}...${NORMAL}" 
    283304     echo "${GREEN}Tagging $SRC_PKG_NAME $UPSTREAM_VERSION" >> $LOG_FILE 
     305 
     306     if [ ! -d tags ]; then 
     307         mkdir tags &> /dev/null 
     308         svn add tags &> /dev/null 
     309     fi 
    284310 
    285311     svn copy trunk/ tags/$UPSTREAM_VERSION &> /dev/null 
Note: See TracChangeset for help on using the changeset viewer.