Changeset 315


Ignore:
Timestamp:
05/02/2009 18:54:54 (3 years ago)
Author:
ccowart
Message:

Wrote initial setup code.

The help and usage statements are still those of confman and not confadmin.
This will need to be fixed before this ticket can be closed.

See #20

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/confadmin.in

    r310 r315  
    3939fi 
    4040 
    41 # Let's make sure that only you can read your working copy 
    42 # Have to make this less restrictive due to NFS home dirs. 
    43 ${NFS_HACK:-false} && umask 022 || umask 027 
     41function repo_setup { 
     42    local short_dirs="/trunk /tags /branches /trunk/checkpoints" 
     43    short_dirs="${short_dirs} /trunk/meta /trunk/meta/recipes" 
     44    local dir dirs 
     45    local msg="Initial confman directory setup."  
     46    if svn ls "${REPO_URI}/trunk/checkpoints" >/dev/null 2>&1 ; then 
     47        echo "It looks like this repository has already been setup." >&2 
     48        exit 1 
     49    fi 
     50    for dir in ${short_dirs} ; do 
     51        dirs="${dirs} ${REPO_URI}/${dir}" 
     52    done 
     53    svn mkdir -m "$msg" ${dirs} 
     54} 
    4455 
    4556# Debug mode? 
     
    5970subcommand=$1 
    6071shift 
    61 trap "conf_cleanExit" EXIT 
     72 
    6273case $subcommand in 
    63     help )                          print_help "$@" ; trap EXIT; exit 0 ;; 
     74    help )                          print_help "$@" ; exit 0 ;; 
     75    setup )                         repo_setup ;; 
    6476    * )                             print_usage 1 ;; 
    6577esac  
    6678 
    67 trap EXIT 
    68 exit 
     79exit 0 
    6980 
    7081# vim:ts=4 
Note: See TracChangeset for help on using the changeset viewer.