Changeset 1798


Ignore:
Timestamp:
Nov 3, 2010 8:09:29 AM (9 years ago)
Author:
stefan
Message:

use complicated way of finding last stable/releases for Data only if old-style Data project is given

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin-functions

    r1797 r1798  
    392392  if test -n "$bstb_filter" ; then
    393393
    394     # If we're dealing with Data, we have to work a bit harder to find our
     394    # If we're dealing with old-style Data, we have to work a bit harder to find our
    395395    # project. See if any of the filtered candidates contain the correct
    396396    # project.
    397397
    398     if expr "$bstb_URL" : '.*/Data/.*' >/dev/null 2>&1 ; then
    399       bstb_projPat='.*'$bstb_proj'/.*'
    400       # echo "Pattern: $bstb_projPat"
    401       for bstb_ver in $bstb_filter ; do
    402         if  expr "$bstb_ver" : $bstb_verPat >/dev/null 2>&1 ; then
    403           # echo "  url: $bstb_listURL/$bstb_ver"
    404           bstb_svnls2="`svn list $bstb_listURL/$bstb_ver`"
    405           # echo "  result: $bstb_svnls2"
    406           if expr "$bstb_svnls2" : $bstb_projPat >/dev/null 2>&1 ; then
    407             bstb_best=$bstb_ver
    408             # echo "  best: $bstb_best"
    409             break
     398    case "$bstb_URL" in
     399      */Data/trunk/* | */Data/stable/* | */Data/releases/* )
     400        bstb_projPat='.*'$bstb_proj'/.*'
     401        # echo "Pattern: $bstb_projPat"
     402        for bstb_ver in $bstb_filter ; do
     403          if  expr "$bstb_ver" : $bstb_verPat >/dev/null 2>&1 ; then
     404            # echo "  url: $bstb_listURL/$bstb_ver"
     405            bstb_svnls2="`svn list $bstb_listURL/$bstb_ver`"
     406            # echo "  result: $bstb_svnls2"
     407            if expr "$bstb_svnls2" : $bstb_projPat >/dev/null 2>&1 ; then
     408              bstb_best=$bstb_ver
     409              # echo "  best: $bstb_best"
     410              break
     411            fi
    410412          fi
    411         fi
    412       done
    413       bstb_bestURL=$bstb_listURL/$bstb_best$bstb_proj
    414     else
    415       bstb_bestURL=`echo $bstb_filter | sed -n -e 's|\([^/]*/\).*$|\1|p'`
    416       bstb_bestURL=$bstb_listURL/$bstb_bestURL
    417     fi
    418 
     413        done
     414        bstb_bestURL=$bstb_listURL/$bstb_best$bstb_proj
     415      ;;
     416      *)
     417        bstb_bestURL=`echo $bstb_filter | sed -n -e 's|\([^/]*/\).*$|\1|p'`
     418        bstb_bestURL=$bstb_listURL/$bstb_bestURL
     419      ;;
     420    esac
    419421  fi
    420422
     
    489491  if test -n "$bstb_filter" ; then
    490492
    491     # If we're dealing with Data, we have to work a bit harder to find our
     493    # If we're dealing with old-style Data, we have to work a bit harder to find our
    492494    # project. See if any of the filtered candidates contain the correct
    493495    # project.
    494496
    495     if expr "$bstb_URL" : '.*/Data/.*' >/dev/null 2>&1 ; then
    496       bstb_projPat='.*'$bstb_proj'/.*'
    497       # echo "Pattern: $bstb_projPat"
    498       for bstb_ver in $bstb_filter ; do
    499         if  expr "$bstb_ver" : $bstb_verPat >/dev/null 2>&1 ; then
    500           # echo "  url: $bstb_listURL/$bstb_ver"
    501           bstb_svnls2="`svn list $bstb_listURL/$bstb_ver`"
    502           # echo "  result: $bstb_svnls2"
    503           if expr "$bstb_svnls2" : $bstb_projPat >/dev/null 2>&1 ; then
    504             bstb_best=$bstb_ver
    505             # echo "  best: $bstb_best"
    506             break
     497    case "$bstb_URL" in
     498      */Data/trunk/* | */Data/stable/* | */Data/releases/* )
     499        bstb_projPat='.*'$bstb_proj'/.*'
     500        # echo "Pattern: $bstb_projPat"
     501        for bstb_ver in $bstb_filter ; do
     502          if  expr "$bstb_ver" : $bstb_verPat >/dev/null 2>&1 ; then
     503            # echo "  url: $bstb_listURL/$bstb_ver"
     504            bstb_svnls2="`svn list $bstb_listURL/$bstb_ver`"
     505            # echo "  result: $bstb_svnls2"
     506            if expr "$bstb_svnls2" : $bstb_projPat >/dev/null 2>&1 ; then
     507              bstb_best=$bstb_ver
     508              # echo "  best: $bstb_best"
     509              break
     510            fi
    507511          fi
    508         fi
    509       done
    510       bstb_bestURL=$bstb_listURL/$bstb_best$bstb_proj
    511     else
    512       bstb_bestURL=`echo $bstb_filter | sed -n -e 's|\([^/]*/\).*$|\1|p'`
    513       bstb_bestURL=$bstb_listURL/$bstb_bestURL
    514     fi
     512        done
     513        bstb_bestURL=$bstb_listURL/$bstb_best$bstb_proj
     514      ;;
     515      *)
     516        bstb_bestURL=`echo $bstb_filter | sed -n -e 's|\([^/]*/\).*$|\1|p'`
     517        bstb_bestURL=$bstb_listURL/$bstb_bestURL
     518      ;;
     519    esac
    515520
    516521  fi
Note: See TracChangeset for help on using the changeset viewer.