Changeset 339


Ignore:
Timestamp:
06/22/2009 17:24:12 (3 years ago)
Author:
blee
Message:
  • Created function conf_repo_uri to correctly generate the repository URI based on REPO_PROTOCOL
  • Removed REPO_URI and REPO_TRUNK global variables
  • Replaced all references to REPO_URI and REPO_TRUNK with calls to conf_repo_uri

See #34

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/confadmin.in

    r325 r339  
    5252    local dir dirs 
    5353    local msg="Initial confman directory setup."  
    54     if @SVN@ ls "${REPO_URI}/trunk/checkpoints" >/dev/null 2>&1 ; then 
     54    if @SVN@ ls "`conf_repo_uri`/trunk/checkpoints" >/dev/null 2>&1 ; then 
    5555        echo "It looks like this repository has already been setup." >&2 
    5656        exit 1 
    5757    fi 
    5858    for dir in ${short_dirs} ; do 
    59         dirs="${dirs} ${REPO_URI}/${dir}" 
     59        dirs="${dirs} `conf_repo_uri`/${dir}" 
    6060    done 
    6161    @SVN@ mkdir -m "$msg" ${dirs} 
  • trunk/confmanlib.sh.in

    r329 r339  
    2727# This file provides shell libraries to confman 
    2828 
    29 REPO_URI="${REPO_PROTOCOL}${REPO_HOSTNAME}${REPO_PATH}" 
    30 REPO_TRUNK="${REPO_PROTOCOL}${REPO_HOSTNAME}${REPO_PATH}/trunk" 
    3129REPO_ACTION="${REPO_DB}/last_action" 
    3230REPO_SYNC_STATE="${REPO_DB}/state" 
     
    4038REPO_VERSION="2" 
    4139REPO_VERSION_FILE="${METADIR}/rversion" 
     40 
     41# Prints the repository URI 
     42function conf_repo_uri { 
     43        local uri 
     44 
     45        case ${REPO_PROTOCOL} in 
     46                file) 
     47                        uri="${REPO_PROTOCOL}${REPO_PATH}" 
     48                        ;; 
     49                *) 
     50                        uri="${REPO_PROTOCOL}${REPO_HOSTNAME}${REPO_PATH}" 
     51                        ;; 
     52        esac 
     53 
     54        echo $uri 
     55} 
    4256 
    4357# Checks out the conf tree if we don't already have it. Updates it if we do. 
     
    5266        chmod 700 ${WORK_PATH} 
    5367         
    54         @SVN@ checkout ${REPO_TRUNK} ${WORK_PATH} 
     68        @SVN@ checkout `conf_repo_uri`/trunk ${WORK_PATH} 
    5569        else 
    5670        @SVN@ update ${WORK_PATH} 
Note: See TracChangeset for help on using the changeset viewer.